The present invention relates to hydrogels endowed with antibacterial properties, to be used for injection in damaged bones or in the production of antibacterial coatings of prostheses for implant in the human or animal body, obtained by loading with antibacterial agents hydrogels formed by derivatives of hyaluronic acid the invention also relates to a kit of parts for producing the antibacterial hydrogels.