Increasing the acid stability and selectivity of nanofiltration (NF) membranes, which are used to treat acidic industrial effluents, is highly beneficial. A series of acid-stable NF membranes featuring polysulfonamide (PSA) separation layers were prepared through interfacial polymerization of branched polyethyleneimine (PEI), polyethylenepolyamine (PPA), and 1,3-benzenedisulfonyl chloride (BDSC) on a porous polyethersulfone (PES) substrate. The optimization of the membrane filtration performance involved analyzing the monomer content in both the aqueous and organic phases and adjusting the PEI-to-PPA ratio, thereby preparing ultrathin PSA layers. The influence of the PSA morphology and structure on the membrane filtration performance was examined. The most effectively optimized sample demonstrated a MgSO4 rejection rate of 95.4 +/- 0.4 % and a water flux of 55.4 +/- 1 L m-2h- 1 at a pressure of 2.0 MPa. The acid stability of the membrane was assessed by examining the permeation, separation, and physicochemical properties before and after undergoing static acid-soaking tests. Following a 5-month exposure to 20 % (w/v) HCl or 20 % (w/v) H2SO4 aqueous solution, the optimal membrane maintained a MgSO4 rejection of 92.6 % at neutral pH, with a permeation flux of 68.2 L m-2h- 1 under 2.0 MPa. Owing to their excellent selectivity, enhanced acid stability, structural controllability, and ease of functionalization, these PSA-NF membranes are promising for use in industries such as mining, semiconductor, and electroplating.