Visibility is an important indicator of air quality and of any consequent meteorological and climate change. Therefore, visibility in Seoul, which is the most polluted city in South Korea, was estimated using machine learning (ML) algorithms based on meteorological (temperature, relative humidity, and precipitation) and particulate matter (PM10 and PM2.5) data acquired from an automatic weather station, and the estimated visibility was compared with the observed visibility. Meteorological data, observed at 1-h intervals between 2018 and 2020, were used. Through learning and validation of each ML algorithm, the extreme gradient boosting (XGB) algorithm was found to be most suitable for visibility estimations (bias=0 km, root mean square error (RMSE)=0.08 km, and r=1 for training data set). Among the meteorological and particulate matter data used for learning the XGB algorithm, the relative importance of PM2.5 and relative humidity variables were high (51% and 19%, respectively), whereas precipitation and wind speed had the low relative importance (approximately 1%). The estimation accuracy for the test dataset was good (bias=-0.11 km, RMSE=2.08 km, and r=0.94); the estimation accuracy was higher in the dry season (bias=-0.06 km, RMSE=1.79 km, and r=0.96) than in the rainy season (bias=-0.17 km, RMSE=2.34 km, and r=0.91). The results of this study indicated a higher correlation than the results of previous visibility estimation studies. The proposed method promotes accurate estimation of visibility in areas with poor visibility, and thus, it can be used to assess public health in areas with poor air quality.