We investigate the chemical abundances of NGC 3603 in the Milky Way, of 30 Doradus in the Large Magellanic Cloud, and of N66 in the Small Magellanic Cloud. Mid-infrared observations with the Infrared Spectrograph on board the Spitzer Space Telescope allow us to probe the properties of distinct physical regions within each object, the central ionizing cluster, the surrounding ionized gas, photodissociation regions, and buried stellar clusters. We detect, and [Fe iii] lines and derive the ionic abundances. Based on the ionic abundance ratio ( Ne iii/H )/(S iii/H ), we find that the gas observed in the MIR is characterized by a lower degree of ionization than the gas observed in the optical spectra. We compute the elemental abundances of Ne, S, Ar, and Fe. We find that the -elements Ne, S, and Ar scale with each other. Our determinations agree well with the abundances derived from the optical. The Ne/S ratio is higher than the solar value in the three giant H ii regions and points toward a moderate depletion of sulfur on dust grains. We find that the neon and sulfur abundances display a remarkably small dispersion (0.11 dex in 15 positions in 30 Doradus), suggesting a relatively homogeneous ISM, even though smallscale mixing cannot be ruled out. Subject headingg s: H ii regions -infrared: ISM -ISM: atoms -ISM: individual ( NGC 3603, 30 Doradus, N66)