Air pollution is the largest environmental and public health challenge in the world today. Air pollution leads to adverse effects on human health, climate and ecosystem. Air is getting polluted because of release of Toxic gases by industries, vehicular emissions and increased concentration of harmful gases and particulate matter in the atmosphere. In order to overcome these issues an IoT based air and sound pollution monitoring system is designed. To design this monitoring system, machine learning algorithms K-NN and Naive Bayes are used. K-Nearest Neighbour and Naive Bayes are machine learning algorithms used to predict the status of pollution present in the environment. In this system, analog to digital converter, global service mobile communication, temperature sensor, humidity sensor, carbon monoxide and sound sensors are interfaced with raspberry pi using serial cable. The sensor data is uploaded in thinkspeak (IoT) and webpage. This data is compared with the trained data to check accuracy. To calculate the accuracy of both algorithms, Python code is developed using python software tool.