In recent years, near infrared (NIR) spectroscopy has been investigated as a tool for monitoring anaerobic digesters, but several adversities in its application have been reported. This study proposes the application of NIR for the determination of alcohols and volatile organic acids from H 2 production bioreactors and evaluates different approaches to optimize the prediction models. Partial least squad (PLS) models were developed using samples from anaerobic batch reactors fed with crude glycerol for wastewater treatment. The analytes predicted were: methanol, ethanol, 1-butanol, acetic, propanoic, butyric, isocaproic and total volatile organic acids (VFA). The optimization of the predictive capacity of the models was achieved through the orthogonal signal correction (OSC) preprocessing and the selection of variables performed by the genetic algorithm (GA). The application of the proposed models were based on the following figures of merit: accuracy, precision, linearity, limits of detection and quantitation, measurement interval, sensitivity, selectivity, signal-to-noise ratio and bias. Despite the low selectivity (maximum of 0.12%), the models presented high sensitivity [g À1 ¼ 0.19 (mg L À1) À1 ], low LOQ (1 mg L À1) and correlation between reference and predicted values (r) at least 0.93, except for propanoic acid (r pred ¼ 0.85). The F-test revealed that the selection of variables by GA significantly improved the accuracy and linearity of the prediction models for methanol, acetic acid, isocaproic acid and VFA. NIR spectroscopy has proved to be a powerful tool for monitoring H 2 production bioreactors since provides fast, low cost and multicomponent information.