Synthesis and characterization of nickel and magnesium ferrites obtained by ionic exchange reactions in molten salts are presented. Although their structure is quite close to the spinel one, the ideal composition MFe2O4 (M:Ni, Mg) is not obtained. Instead, some extra octahedral sites are occupied thus, the structure is better described as intermediate between the spinel and defective NaCl one.