TiN films with different nitrogen contents were deposited on glass and Si (100) substrates by d. c. magnetron reactive sputtering. The structure of the films was determined by Xray diffraction. It was found that heat treatment at 773 decreased the lattice parameter. A considerable thermal instability of over-stoichiometric films was observed after annealing films in air. This instability enhanced with increasing nitrogen content and is characterized by an abundant appearance of clear and dark disks in Scanning Electron Microscopy (SEM). Also, it was shown that the film instability does not come from an interfacial reaction but was observed when the TiNx layers present a (200) preferred orientation together with high nitrogen content.