In this study, product recovery and process water recycling in a model Cleaning-in-Place (CIP) wastewater containing anionic and nonionic surfactants, dye, and salt generated from the production of a liquid dishwasher detergent was investigated using a two-step nanofiltration (NF) process. In the first step, a loose NF membrane was used for product recovery, especially surfactants and dye. Effects of pH (3, 5, 7, and 10), temperature (25 and 40 degrees C), and transmembrame pressure (8,12,16, and 20 bar) on the membrane performance were evaluated. The best results were obtained at pH 5,25 degrees C, and 20 bar which provided the highest levels of both recovery and rejection of surfactants, dye, and salt. In the second step, the quality of permeate obtained from the loose NF membrane under the conditions providing the best performance was improved using a tight NF membrane. Even better rejections were achieved from the experiments with this NF membrane. Experimental results showed that recovery of surfactants and dye was achieved for re-using in the production of liquid dishwasher detergent, and the permeate was obtained in much the same quality of the water used in the first step of the CIP system using the loose membrane and tight membrane, respectively. In addition, the flux decline caused by the concentration polarization and fouling was evaluated for both membranes. Fouling on the surface of membranes was characterized with atomic force microscopy (AFM) and contact angle measurements. (C) 2008 Elsevier B.V. All rights reserved.