Purpose To evaluate the efficacy and safety of intravitreal chlorhexidine (CHX) for sterilising the vitreous cavity in bacterial endophthalmitis. Methods For in-vitro experiments, full-thickness retina explants were harvested from freshly enucleated pig eyes. Six-millimeter circular sensory retina patches were then incubated in varying concentrations of CHX (0.625-800 µg/mL) for 24 hours. Retinal cell viability was determined at the end of the incubation period with a live-dead assay. The bactericidal effects of the tested CHX concentrations were determined using a quantitative suspension test on Staphylococcus epidermidis. The safety of CHX was also tested by injecting varying doses of CHX (50-400 µg/mL) into the vitreous cavity of albino rabbits followed by flash electroretinography (ERG) and light microscopy. The bactericidal effect of the non-toxic CHX doses was determined using the rabbit model of endophthalmitis created by injecting 3000 CFU/0.1 mL of Staphylococcus epidermidis. Results In vitro concentrations of CHX greater than 6.25 µgr/mL exerted a bactericidal effect, while concentrations of CHX less than 200 µg/mL did not impair retinal cell viability. Intravitreal concentrations of CHX between 20-100 µg/mL were adequate to sterilise the infected rabbit vitreous cavity in the animal model. No significant functional or anatomical deleterious effect was observed with ERG or light microscopy. Conclusion CHX can sterilise the vitreous cavity in an animal model of bacterial endophthalmitis without impairing retinal cell viability. Our results encourage further research for clinical use of chlorhexidine in treatment of bacterial endophthalmitis.