The nitro group of dimethyl (1-nitromethylalkyl)phosphonates is conveniently converted into a formyl group by reaction with singlet oxygen to give dimethyl (1-formylalkyl)phosphonates. (1-Formylbutyl)diphenylphosphine oxide is prepared by the same reaction.