Cellulose nanofibrils constitute an attractive raw material for carbon neutral, biodegradable, nanostructured materials. In a aqueous suspensions, these nanofibrils are stabilized by electrostatic repulsion arising from deprotonated carboxyl groups at the fibril surface. In the present work, a new model is developed for colloidal stability by considering the deprotonation and electrostatic screening. This model predicts the fibril-fibril interaction potential in a given pH and ionic strength environment. Experiments support the model predictions that aggregation is induced by decreasing pH, thus reducing the surface charge, or by increasing salt concentration. It is shown that the primary aggregation mechanism for salt addition is the surface charge reduction through specific interactions of counter-ions with the deprotonated carboxyl groups, while the screening effect of the salt is of secondary importance.