A nanofibrillar cellulose hydrogel is disclosed. The nanofibrillar cellulose hydrogel may comprise azido-modified nanofibrillar cellulose having a substituent represented by the formula-O-(CH2)n-S(O)m-L1-N3, wherein n is in the range of 1 to 10; m is 0 or 1; and L1 is a linker; wherein the substituent is attached to a carbon of one or more glucosyl units of the azido-modified nanofibrillar cellulose, thus forming an ether bond to the carbon.