Replacing calcium with ammonium counterion in lignosulfonates from paper mills affects their molecular properties and bioactivity.