Air quality is a crucial concern for urban environmental health, affecting human well-being and ecological equilibrium. Improving air quality by reducing air quality index (AQI) levels directly contributes to achieving sustainable development goals (SDGs), particularly SDG 3 (good health and well-being) and SDG 11 (sustainable cities and communities). Dehradun, situated in the foothills of the Himalayas, faces the challenge of deteriorating air quality due to geographical and climatic factors. This study introduces machine learning (ML) models to forecast the AQI in Dehradun City, addressing the local need for effective air quality management in Himalayan towns. The research utilizes data collected over 2 years from the city, encompassing parameters such as nitrogen dioxide (NO2), carbon monoxide (CO), sulfur dioxide (SO2), particulate matter (PM2.5 and PM10), and ozone (O3). Performance metrics such as R-squared (R2), root mean square error (RMSE), and mean absolute error (MAE) are used to assess the prediction accuracy of these ML models. Lasso regressor performs the best with MAPE: 0.0269, MAE: 0.0185, RMSE: 0.0272 and R2 score of 0.9999. The results illustrate the effectiveness of these techniques in forecasting AQI levels in Dehradun, facilitating pre-emptive measures to overcome air pollution and protect public health. This study contributes to advancing air quality prediction methodologies. It provides insights for policymakers and urban planners to develop effective plans tailored to Himalayan towns like Dehradun, where air quality degradation remains a pressing issue often overlooked.