The structure of dispersions of TEMPO-oxidised cellulose nanofibrils (OCNF), at various concentrations, in water and in NaCl aqueous solutions, was probed using small angle X-ray scattering (SAXS). OCNF are modelled as rod-like particles with an elliptical cross-section of 10 nm and a length greater than 100 nm. As OCNF concentration increases above 1.5 wt%, repulsive interactions between fibrils are evidenced, modelled by the interaction parameter νRPA > 0. This corresponds to gel-like behaviour, where G′ > G′′ and the storage modulus, G′, shows weak frequency dependence. Hydrogels can also be formed at OCNF concentration of 1 wt% in 0.1 M NaCl(aq). SAXS patterns shows an increase of the intensity at low angle that is modelled by attractive interactions (νRPA < 0) between OCNF, arising from the screening of the surface charge of the fibrils. Results are supported by ζ potential and cryo-TEM measurements.