We developed a novel strategy by oxidation-derivatization combined mass spectrometry analysis for the determination of 5-hydroxymethylcytosine and 5-formylcytosine in both DNA and RNA. We reported the presence of 5-formylcytosine in RNA of mammals and found that ascorbic acid and hydroquinone can increase the oxidation of 5-methylcytosine to 5-hydroxymethylcytosine in DNA and RNA.