Quaternization xylans were prepared by treating xylans differing in structural and molecular properties with 3-chloro-2-hydroxypropyltrimethylammonium chloride (CHMAC) in aqueous NaOH under mild reaction conditions. The degree of substitution with quaternary ammonium groups can be monitored by altering the amount of CHMAC at optimum molar ratios of NaOH/CHMAC in the range 1.2-1.6, without changing the structure of the xylan backbones. Hot water pretreatment of the xylans in the alkaline activation step significantly enhances their reactivity. The presence of alkylammonium substituents was revealed by IR and NMR spectroscopy. The applicability of quaternized xylans as a retention aid in papermaking is demonstrated on thermomechanical pulp. Xylans, therefore, represent an important renewable resource for the production of novel cationic biopolymers.