Abstract. Machine learning (ML) models are becoming a meaningful tool for modeling air pollutant concentrations. ML models are capable of learning and modeling complex nonlinear interactions between variables, and they require less computational effort than chemical transport models (CTMs). In this study, we used gradient-boosted tree (GBT) and multi-layer perceptron (MLP; neural network) algorithms to model near-surface nitrogen dioxide (NO2) and ozone (O3) concentrations over Germany at 0.1∘ spatial resolution and daily intervals. We trained the ML models using TROPOspheric Monitoring Instrument (TROPOMI) satellite column measurements combined with information on emission sources, air pollutant precursors, and meteorology as feature variables. We found that the trained GBT model for NO2 and O3 explained a major portion of the observed concentrations (R2=0.68–0.88 and RMSE=4.77–8.67 µg m−3; R2=0.74–0.92 and RMSE=8.53–13.2 µg m−3, respectively). The trained MLP model performed worse than the trained GBT model for both NO2 and O3 (R2=0.46–0.82 and R2=0.42–0.9, respectively). Our NO2 GBT model outperforms the CAMS model, a data-assimilated CTM but slightly underperforms for O3. However, our NO2 and O3 ML models require less computational effort than CTM. Therefore, we can analyze people's exposure to near-surface NO2 and O3 with significantly less effort. During the study period (30 April 2018 and 1 July 2021), it was found that around 36 % of people lived in locations where the World Health Organization (WHO) NO2 limit was exceeded for more than 25 % of the days during the study period, while 90 % of the population resided in areas where the WHO O3 limit was surpassed for over 25 % of the study days. Although metropolitan areas had high NO2 concentrations, rural areas, particularly in southern Germany, had high O3 concentrations. Furthermore, our ML models can be used to evaluate the effectiveness of mitigation policies. Near-surface NO2 and O3 concentration changes during the 2020 COVID-19 lockdown period over Germany were indeed reproduced by the GBT model, with meteorology-normalized near-surface NO2 having significantly decreased (by 23±5.3 %) and meteorology-normalized near-surface O3 having slightly increased (by 1±4.6 %) over 10 major German metropolitan areas when compared to 2019. Finally, our O3 GBT model is highly transferable to neighboring countries and locations where no measurements are available (R2=0.87–0.94), whereas our NO2 GBT model is moderately transferable (R2=0.32–0.64).