Fibrous networks formed by biological polymers such as collagen or fibrin exhibit nonlinear mechanical behavior. They undergo strong stiffening in response to weak shear and elongational strains, but soften under compressional strain, in striking difference with the response to the deformation of flexible-strand networks formed by molecules. The nonlinear properties of fibrous networks are attributed to the mechanical asymmetry of the constituent filaments, for which a stretching modulus is significantly larger than the bending modulus. Studies of the nonlinear mechanical behavior are generally performed on hydrogels formed by biological polymers, which offers limited control over network architecture. Here, we report an engineered covalently cross-linked nanofibrillar hydrogel derived from cellulose nanocrystals and gelatin. The variation in hydrogel composition provided a broad-range change in its shear modulus. The hydrogel exhibited both shear-stiffening and compression-induced softening, in agreement with the predictions of the affine model. The threshold nonlinear stress and strain were universal for the hydrogels with different compositions, which suggested that nonlinear mechanical properties are general for networks formed by rigid filaments. The experimental results were in agreement with an affine model describing deformation of the network formed by rigid filaments. Our results lend insight into the structural features that govern the nonlinear biomechanics of fibrous networks and provide a platform for future studies of the biological impact of nonlinear mechanical properties.