A method of preparing a coated nanoparticle can include decomposing a compound to produce a nanoparticle, oxidizing the nanoparticle to produce an oxidized nanoparticle, and coating the oxidized nanoparticle with a zwitterionic ligand to produce the coated nanoparticle. The coated nanoparticle or the nanoparticle can be used in magnetic resonance imaging.