The analysis of chemical structural characteristics of biorefinery product streams (such as lignin and tannin) has advanced substantially over the past decade, with traditional wet-chemical techniques being replaced or supplemented by NMR methodologies. Quantitative 31P NMR spectroscopy is a promising technique for the analysis of hydroxyl groups because of its unique characterization capability and broad potential applicability across the biorefinery research community. This protocol describes procedures for (i) the preparation/solubilization of lignin and tannin, (ii) the phosphitylation of their hydroxyl groups, (iii) NMR acquisition details, and (iv) the ensuing data analyses and means to precisely calculate the content of the different types of hydroxyl groups. Compared with traditional wet-chemical techniques, the technique of quantitative 31P NMR spectroscopy offers unique advantages in measuring hydroxyl groups in a single spectrum with high signal resolution. The method provides complete quantitative information about the hydroxyl groups with small amounts of sample (~30 mg) within a relatively short experimental time (~30-120 min).