Membranes with improved permselectivity in electrolytic and electrodialysis cells in acidic media are based on sulfonated polyimides prepd. from two diamines, 1 of which has sulfo groups. A typical membrane was based on a polyimide with repeating units having structures based on 2,2'-disulfo-4,4'-biphenyldiamine, 4,4'-diaminodiphenyl ether, and 1,4,5,8-naphthalenetetracarboxylic aci