TiN thin films were deposited on GaAs and InP by rf reactive sputtering. Samples of TiN/GaAs and TiN/InP then were investigated by a multitude of techniques to evaluate the morphology of as-deposited and post-annealed films and to investigate contact properties such as barrier height, carrier concentration, and ideality factor. Optical emission spectroscopy was used as an in situ process control to optimize certain film properties. The results show that the deposition conditions, such as total pressure, N2/Ar flow ratio, and substrate temperature, have an important effect on the properties of the resulting films. Under optimized conditions, near-stoichiometric TiN films with resistivities as low as 20 μΩ cm were obtained. Rapid thermal annealing (RTA) of TiN/GaAs enhanced the barrier height and improved the ideality factor of these diodes. These systems were stable after RTA at temperatures as high as 800 °C. As-deposited TiN on InP, in contrast, typically exhibits nonrectifying behaviour. The characteristics become more ohmic after RTA at elevated temperatures.