In the synthesis of the organic sensor, the molecular structure will affect the ability of a compound to be used as a colorimetric chemosensor. Here, we present a simple synthesis technique for 5-nitrovanillin. It has been successfully synthesized using nitric acid as a source of nitro groups. Dichloromethane DCM was used as a solvent, and the synthesis was carried out at low temperatures (under 5°C). The method produces a good yield. The nitro group attached to the structure of the chemosensor plays a role in prolonging the electron delocalization. Its effect is in the process of anion recognition by the chemosensor. The formation of a sensor-analyte complex between the chemosensor and anion produces a color change in the solution.