The indoor formaldehyde concentration is in trace quantities; however, it considerably deteriorates indoor air quality and poses a serious threat to human health and ecosystems. Since current formaldehyde analyzers are only suitable for high-concentration detection or are expensive, there is a pressing need for an easy-to-use, storable, and highly sensitive formaldehyde detector. In this study, we developed a colorimetric sensing sphere using affordable and eco-friendly sodium alginate as a porous matrix. Polyethyleneimine, a molecule rich in amino groups, and an indicator are embedded in the matrix to create a core-shell structured, responsive porous hydrogel colorimetric sensor for indoor formaldehyde detection. The sensing sphere exhibits high sensitivity and excellent detection limits at a polyethyleneimine to pH agent mass ratio of 23:1, reaching a sensitivity of 0.02 mg/m3 and a detection limit of 0.06 mg/m3. The sensing sphere demonstrates superior selectivity among common indoor pollutants and remains unaffected by temperature (up to 70 ℃) or humidity (20–80 %) changes. Moreover, the core-shell structure of the colorimetric sensor ball addresses the poor stability and storage issues. The core-shell structure resists interference from external environmental changes, offering remarkable stability for 6 months and longer, hence, facilitating easy transportation and storage. The colorimetric sensing sphere is simple, cost-effective, and reliable for ordinary households, thus maintaining the indoor air quality and health of residents.