Protein nanofibrils with 10–20 nm diameters were formed by heating whey protein solution at pH 2·0. Nanofibrils solution was deacidified slowly through dialysis followed by adding different amounts of CaCl2 (0–80 mM) into the dialysis water resulting in formation of a soft viscoelastic gel over time. The gel fabricated from the nanofibrils solution dialyzed against distilled water with 0 mM CaCl2 had zero ash content. Fourier transform infra-red spectroscopy revealed a change in the pattern of hydrogen bond formation in gel network by calcium chloride. The higher the ash content of gels, the lower was the storage modulus and fracture stress of samples. Gels with higher ash contents had a more porous microstructure which was attributed to the diminished hydrophobic interactions and hydrogen bonding among nanofibrils by the action of chloride. Higher ash contents also led to higher water holding capacity of gels which was attributed to the influence of the strongly hydrated calcium ions that interacted with the non-charged regions of proteins via site-specific interactions.