Volatile impurities occur frequently in pharmaceutical products and packaging and are often of significant concern due to their toxicity. SIFT-MS is a direct-injection mass spectrometry technique that provides real-time, selective, and economic analysis of volatile compounds in the gas phase. In addition to routine volatile organic compounds (VOCs), chromatographically challenging volatiles, such as formaldehyde, dimethylamine, and NDMA, are analyzed in real time without requiring derivatization or other special handling.