We report on high-pressure optical absorption measurements on InN epilayers with a range of free-electron concentrations (5 × 10 17 -1.6 × 10 19 cm −3 ) to investigate the effect of free carriers on the pressure coefficient of the optical band gap of wurtzite InN. With increasing carrier concentration, we observe a decrease of the absolute value of the optical band gap pressure coefficient of wurtzite InN. An analysis of our data based on the k·p model allows us to obtain a pressure coefficient of 32 meV/GPa for the fundamental band gap of intrinsic wurtzite InN. Optical absorption measurements on a 5.7-μm-thick InN epilayer at pressures above the wurtzite-to-rocksalt transition have allowed us to obtain an accurate determination of the indirect band gap energy of rocksalt InN as a function of pressure. Around the phase transition (∼15 GPa), a band gap value of 0.7 eV and a pressure coefficient of ∼23 meV/GPa are obtained.