Optimizing membrane fabrication conditions, including monomer and catalyst concentrations, reaction time, etc., is crucial for achieving high-performance membranes. However, the multitude of variables involved can result in a complex and laborious permutation process, making trial-and-error optimization challenging. To address this issue, we developed a conventional multiple linear regression model and machine learning (ML) models, specifically random forest (RF) and multi-layer perceptron (MLP), to predict the performance of nanofiltration membranes in terms of key parameters such as pure water permeance or PWP (LMH/bar), Na2SO4 rejection (%), and NaCl rejection (%), based on specified input variable ranges. The input variables utilized to construct the models are the concentration of piperazine (PIP) (0.01–2 wt%), the concentration of trimesoyl chloride (TMC) (0.05–0.15 wt%), the concentration of sodium lauryl sulfate (SLS) (0–10 mM), and reaction time (5–1200 s). The conventional regression model failed to predict the membrane performance. The RF model exhibited the best prediction capability for PWP and NaCl rejection with the R2 of 0.9806 and 0.9812 for training, and 0.9669 and 0.9082 for testing, respectively. Similarly, the MLP model outperformed the RF model in predicting Na2SO4 rejection with an R2 of 0.9972 for testing and 0.9844 for training. The best membrane exhibited permeance ranging from 16 to 20 LMH/bar and selectivity between NaCl and Na2SO4 of over 4000, was facilitated by specific conditions. These conditions included lower concentrations of PIP (0.05–0.1 wt%), intermediate concentration of TMC (0.1 wt%), lower concentration of SLS (1 mM), and shorter reaction times (5–30 s). The best-performing ML-based models have been used to provide insights into the relative importance of these input variables in determining membrane performance, thereby aiding in correlating model predictions with fundamental principles of membrane fabrication processes.