The electronic sputtering of indium under swift heavy ion bombardment is investigated using time of flight secondary ion mass spectrometry in combination with 157 nm laser postionization. Secondary ion and neutral mass spectra generated under the impact of 4.8 MeV/u 48Ca10+ ions are analyzed in order to determine the ionization probability of the emitted indium atoms, and the results are compared to those measured under nuclear sputtering conditions via bombardment by 5 keV Ar+ primary ions. The influence of surface contamination on the ionization probability is studied by comparing (1) a pristine surface covered by a native oxide layer, (2) a kilo-electron-volt sputter-cleaned surface, and (3) a controlled oxygen coverage established by dosing the precleaned surface with O2. It is found that the native oxide layer increases the ionization probability for both kilo-electron-volt and mega-electron-volt primary ions. In contrast, oxygen deposited on a sputter-cleaned surface results in the well-known matrix effect for kilo-electron-volt ions, but has no influence on the ionization probability for the mega-electron-volt ions. In the case of a thoroughly sputter-cleaned surface a four- to sevenfold higher ionization probability for indium atoms is found for 4.8 MeV/u 48Ca10+ as compared to 5 keV Ar+ bombardment.