Since July 2018 several drugs have been recalled due to contamination with N-nitrosodimethylamine (NDMA), a probable human carcinogen. Dimethylamine (DMA) and nitrite are precursors in the formation of NDMA. In this study, ion chromatography (IC) methods were developed for the determination of these two precursors in drug substances and drug products. Two methods were developed to determine DMA in two drug products using a cation exchange separation coupled to suppressed conductivity detection. The limit of detection of DMA is < 1 μg/g of active pharmaceutical ingredient (API) for both methods. Nitrite was determined using an anion exchange separation coupled with UV absorbance detection. The limit of detection of nitrite was 0.918 μg/g API. The developed methods were successfully applied to DMA and nitrite determinations in five drug products including metformin, losartan, ranitidine, Nytol, and Benadyrl, and two drug substances (APIs), losartan potassium and metformin hydrochloride. Some samples contained nitrite and DMA at detectable levels. Dimethylamine and nitrite recovery from pharmaceutical samples ranged from 96.0-104 %. The developed methods should be useful for the rapid screening and quantification of nitrite and DMA in pharmaceuticals and in-process samples to assess the likelihood of NDMA formation. The methods for DMA should be applicable to other amines to assess the likelihood of the formation of other nitrosamines in pharmaceutical products.