C-H bond formylation is the most immediate way to incorporate the versatile formyl group into (hetero)aromatics. However, the type of reagents and severe conditions involved in the classical formylation methods often curtail their application, especially in the presence of other functional groups. Herein, we present the Eschenmoser's salt, a commercially available (dimethylamino)methylating chemical, as a useful reagent for the C-H formylation of indolizines and other compounds. The method is straightforward and mild, furnishing indolizinecarbaldehydes in modest-to-good yields with exclusive and remote regioselectivity. Furthermore, these compounds can be easily transformed into push-pull dyes and are highly selective in the colorimetric detection of nitrite, a substance extensively employed as preservative in the food industry, the concentration of which is crucial to control to prevent harmful effects in living organisms. The assay is simple, allowing the naked-eye detection of nitrite in solution or on a cotton swab for a wide range of concentrations.