Tofu is a processed food made from soybeans that are crushed or mashed into porridge and left for a predetermined time to produce good and quality tofu. Tofu is one of the foods that are often consumed by the public and not a few unscrupulous producers of tofu take advantage of this by cheating in the production of making tofu by adding materials that should not be used in production such as formalin and other chemicals. If the human body inhales and even consumes tofu which is formalin, it can cause serious health complications such as respiratory problems, digestive disorders, liver or liver disorders, even if consumed continuously can lead to kidney failure, heart disease, jaundice. or hepatitis and other chronic diseases. Therefore, a study is needed on detecting formalin or non-formalin tofu by using Arduino Uno as the microcontroller, TCS3200 color sensor, HCHO formalin sensor and using the Naive Bayes method as the classification process. In tests that have been carried out 10 times, the percentage of success is 100%.