The chemical reactions and pathways resulting in the formation of cyanate, NCO-, the anion of cyanic acid.