Nowadays, wastewater reuse in Mediterranean countries is necessary to cover the water demand. This contributes to the protection of the environment and encourages the circular economy. Due to increasingly strict regulation, the secondary effluent of a wastewater treatment plant requires further (tertiary) treatment to reach enough quality for its reuse in agriculture. Ultrafiltration is a membrane technique suitable for tertiary treatment. However, the most important drawback of ultrafiltration is membrane fouling. The aim of this work is to predict membrane fouling and ultrafiltered wastewater permeate quality for a particular membrane, using the information given by an exhaustive secondary effluent characterization. For this, ultrafiltration of real and simulated wastewaters and of their components after fractionation has been performed. In order to better characterize the secondary effluent, resin fractionation and further membrane ultrafiltration of the generated fractions and wastewater were performed. The results indicated that hydrophobic substances were lower than hydrophilic ones in the secondary effluent. Supelite DAX-8, Amberlite XAD-4 and Amberlite IRA-958 resins were found not to be specific for humic acids, proteins and carbohydrates, which are the main components of the effluent organic matter. Two models have been performed using statistics (partial least squares, PLS) and an artificial neural network (ANN), respectively. The results showed that the ANN model predicted permeate quality and membrane fouling with higher accuracy than PLS.