The effect of nitrogen addition on the structural and electronic properties of hydrogenated amorphous carbon ͑a-C:H͒ films has been characterized in terms of its composition, sp 3 bonding fraction, infrared and Raman spectra, optical band gap, conductivity, and paramagnetic defect. The variation of conductivity with nitrogen content suggests that N acts as a weak donor, with the conductivity first decreasing and then increasing as the Fermi level moves up in the band gap. Compensated behavior is found at about 7 at. % N, for the deposition conditions used here, where a number of properties show extreme behavior. The paramagnetic defect density and the Urbach tailwidth are each found to decrease with increasing N content. It is unusual to find alloy additions decreasing disorder in this manner.