Shallot farmers often face pest attacks that reduce crop yields. However, in shallot farming, farmers do not always achieve satisfactory results; there are times when they experience failure due to several factors, one of which is pests on shallot plants. To address this issue, this research develops an automatic pest trap tool using Internet of Things (IoT) technology. The purpose of this research is to replace the manual tool with an automatic pest trap system using the Arduino IDE application as a platform to create the tool's program, and PHP programming language for the web. The method used in this research is qualitative, with data collection carried out through direct observation on farmers' fields to gather the necessary data for building the pest trap. The research results show that the pest trap, designed with ultraviolet LED lights and controlled by Arduino, can effectively attract pests. This tool is also monitored through a web application, which is used to monitor the tool’s condition to ensure it is functioning as intended.