Magnetic nanoparticles are potential candidates for applications such as high density data storage, multifunctional materials, targeted drug delivery or hyperthermia. Due to their large surface-to-volume ratio, surface effects dominate the properties of particles. In metal oxide NPs, an oxidized shell is often found. This may lead to an exchange bias effect, which stabilizes the magnetic moments of the ferro-/ferrimagnetic component. By tuning the ratio of antiferromagnetic wustite, ferrimagnetic magnetite and maghemite in iron oxide nanoparticles, one is able to control the magnetic stability of magnetic moments for potential applications in data storage or spintronics. Combining magnetometry, total scattering experiments with pair distribution function analysis and X-ray absorption spectroscopy, the local structure and the magnetic properties of different phases of iron oxide nanoparticles are studied. Using various annealing procedures, the composition of iron oxide nanoparticles is tuned. As the maghemite component is reduced, an increase in the lattice parameter is observed. This is due to an increasing amount of magnetite, which has a larger lattice constant compared to maghemite. Moreover, the site occupancy factor of the octahedral Fe site is increased after the nanoparticles are reduced towards magnetite. After the oxidation, the site occupancy factor decreases.