Methods for forming silicon nitride hard masks are provided. The silicon
nitride hard masks include carbon-doped silicon nitride layers and
undoped silicon nitride layers. Carbon-doped silicon nitride layers that
are deposited from a mixture comprising a carbon source compound, a
silicon source compound, and a nitrogen source in the presence of RF
power are provided. Also provided are methods of UV post-treating silicon
nitride layers to provide silicon nitride hard masks. The carbon-doped
silicon nitride layers and UV post-treated silicon nitride layers have
desirable wet etch rates and dry etch rates for hard mask layers.