Vitrectomy is a standard ophthalmic procedure to remove the vitreous body from the eye. The biomechanics of the vitreous affects its duration (by changing the removal rate) and the mechanical forces transmitted via the vitreous on the surrounding tissues during the procedure. Biomechanical characterization of the vitreous is essential for optimizing the design and control of instruments that operate within the vitreous for improved precision, safety, and efficacy. The measurements are carried out using a magnetic microprobe inserted into the vitreous, a method known as magnetic microrheology. The location of the probe is tracked by a microscope/camera while magnetic forces are exerted wirelessly by applied magnetic fields. In this work, in vitro artificial vitreous, ex vivo human vitreous and ex vivo porcine vitreous were characterized. In addition, in vivo rabbit measurements were performed using a suturelessly injected probe. Measurements indicate that viscoelasticity parameters of the ex vivo human vitreous are an order of magnitude different from those of the ex vivo porcine vitreous. The in vivo intra-operative measurements show typical viscoelastic behavior of the vitreous with a lower compliance than the ex vivo measurements. The results of the magnetic microrheology measurements were validated with those obtained by a standard atomic force microscopy (AFM) method and in vitro artificial vitreous. This method allows minimally-invasive characterization of localized mechanical properties of the vitreous in vitro, ex vivo, and in vivo. A better understanding of the characteristics of the vitreous can lead to improvements in treatments concerning vitreal manipulation such as vitrectomy.