The widely used anticoagulant pharmaceutical, heparin, is a polydisperse, heterogeneous polysaccharide. Heparin is one of the essential medicines defined by the World Health Organisation but, during 2007-2008, was the subject of adulteration. The intrinsic heterogeneity and variability of heparin makes it a challenge to monitor its purity by conventional means. This has led to the adoption of alternative approaches for its analysis and quality control, some of which are based on multivariate analysis of 1H NMR spectra, or exploit correlation techniques. Such NMR spectroscopy-based analyses, however, require costly and technically demanding NMR instrumentation. Here, an alternative approach based on the use of attenuated total reflectance Fourier transform infrared spectroscopy (FTIR-ATR) combined with multivariate analysis is proposed. FTIR-ATR employs more affordable and easy-to-use technology and, when combined with multivariate analysis of the resultant spectra, readily differentiates between glycosaminoglycans of different types, between heparin samples of distinct animal origins and enables the detection of both known heparin contaminants, such as over-sulphated chondroitin sulfate (OSCS), as well as other alien sulphated polysaccharides in heparin samples to a degree of sensitivity comparable to that achievable by NMR. The approach will permit the rapid and cost-effective monitoring of pharmaceutical heparin at any stage of the production process and indeed, in principle, the quality control of any heterogeneous or variable material.