Metal-free biocompatible white-light-emitting diode material is enabled using graphite-carbon nitride (g-C3N4) silica gels that are conveniently fabricated from a one-step solvothermal reaction. The novel g-C3N4 silica gels can also be used as water-resistant biocompatible fluorescent inks.