Exhaled breath has proven to be a valuable source of information about human bodies. Subtle differences between volatile organic compounds (VOCs) formed endogenously can be detected and become a base for a potential monitoring tool for health and disease. Until now, there has been a lack of biological and mechanistic knowledge of the processes involved in the production of relevant VOCs. Among the possible sources of health-related and disease-related VOCs are microorganisms found in the respiratory tract and in the gut. Other VOCs in the body are produced by cells that are influenced by the disease, for instance, due to metabolic disorders and/or inflammation. To gain insight into the in vivo production of VOCs by human cells and thus the exhaled breath composition, in vitro experiments involving relevant cells should be studied because they may provide valuable information on the production of VOCs by the affected cells. To this aim we developed and validated a system for dynamically (continuously) collecting headspace air in vitro using a Caco-2 cell line. The system allows the application of different cell lines as well as different experimental setups, including varying exposure times and treatment options while preserving cell viability. Significant correlation (p ⩽ 0.0001) between collection outputs within each studied group confirmed high reproducibility of the collection system. An example of such an application is presented here. We studied the influence of oxidative stress on the VOC composition of the headspace air of Caco-2 cells. By comparing the VOC composition of air flushed through empty culture flasks (n = 35), flasks with culture medium (n = 35), flasks with medium and cells (n = 20), flasks with medium and an oxidative stressor (H2O2) (n = 20), and flasks with medium, stressor, and cells (n = 20), we were able to separate the effects from the stressor on the cells from all other interactions. Measurements were performed with gas chromatography time-of-flight mass spectrometry. Multivariate data analysis allowed detection of significant altered compounds in the compared groups. We found a significant change (p ⩽ 0.001) of the composition of VOCs due to the stressing of the Caco-2 cells by H2O2. A total of ten VOCs showed either increased or decreased abundance in the headspace of the cell cultures due to the presence of the H2O2 stressor.