We prepared and characterized an array of polarity-sensitive fluorescent dyes (7and9a,9band9c). Fluorescent dyes are based on imidazole cores, suitably functionalized with a conjugated push-pull system. The photophysical properties of the synthesized materials were elaborately investigated. These new fluorescent probes showed good fluorecence emission, higherϕFlvalues and large Stokes shifts in different organic solvents because of their ICT nature. Furthermore, with aldehyde groups as the recognition sites, all the dyes could act as ratiometric fluorescent sensors towards methanol. The selective ratiometric fluorescence response towards methanol is due to the strong intermolecular H-bonding between the aldehyde unit and methanol. The detection limit of methanol was found to be at the ppm level. Methanol sensing was confirmed using emission spectroscopy, FTIR studies and theoretical calculations. Additionally, these dyes were used for the detection of methanol in biodiesel and in test paper strips. © The Royal Society of Chemistry and the Centre National de la Recherche Scientifique 2021.