Methanoic acid (formic acid) is responsible for the stinging pain from nettle hairs.