Extractives are various low molar mass compounds found in plants, their main role is to protect against oxidation, microbial attack and adverse weather conditions. Some types of extractives can be a source of process and quality issues followed by financial losses in the pulp and paper industry. Ideally, the extractive content in the pulps should be continuously monitored and controlled. The analytical method commonly used in the industry is time-consuming, expensive, unsustainable and destructive. A novel method, which could be easily applied in pulp mills, is needed. In our work we utilized near infrared spectroscopy (NIRS) reflectance measurement for quick and non-destructive detection and quantification of extractives in dried kraft pulps. Additionally, we incorporated machine learning to extract chemical information from the non-linear and overlapping spectra and used gas chromatography (GC) as a reference method. To mitigate the variability of pulps, we firstly prepared simplified samples, where cellulose sheets were spiked with different quantities of extractive model compounds (stearic acid and betulinol). Logistic regression could recognize with 89.2% accuracy if the sample contained stearic acid, betulinol, both or neither of them. Artificial neural network could classify the samples containing different concentrations of stearic acid into six categories with 89.5% accuracy. The calibration of total extractive content by partial least squares (PLS) resulted in coefficient of determination of prediction (RP2) and root standard error of prediction (RSEP) 0.78 and 0.35, respectively. NIRS measurements of industrial kraft pulps made it possible to predict the content of fatty acids, triterpenoids and prenols, esters, long-column and total GC extractives with RP2 over 0.71and RSEP below 0.35 using PLS. This proves NIRS combined with machine learning as a capable method for pulp extractive content estimation and online monitoring of pulp quality, potentially leading to better efficiency of pulping process, making fibre-based products more competitive economically.