In myopia, diabetes and ageing, fibrous vitreous liquefaction and degeneration is associated with the formation of opacities inside the vitreous body that cast shadows on the retina, appearing as `floaters' to the patient. Vitreous opacities degrade contrast sensitivity function and can cause notable impairment in vision-related quality of life. Here we introduce `nanobubble ablation' for safe destruction of vitreous opacities. Following intravitreal injection, hyaluronic acid-coated gold nanoparticles and indocyanine green, which is widely used as a dye in vitreoretinal surgery, spontaneously accumulate on collagenous vitreous opacities in the eyes of rabbits. Applying nanosecond laser pulses generates vapour nanobubbles that mechanically destroy the opacities in rabbit eyes and in patient specimens. Nanobubble ablation might offer a safe and efficient treatment to millions of patients suffering from debilitating vitreous opacities and paves the way for a highly safe use of pulsed lasers in the posterior segment of the eye.