Electroreduction of CO2 into the highly valuable fuel formic acid (HCOOH) has been considered an ideal method for converting renewable energy and addressing environmental challenges. Herein, we present a straightforward and rapid method for preparing Sn(OH)4 catalysts specifically designed for electroreducing CO2 to formate. The Sn(OH)4 catalyst obtained through in-situ electrochemical reduction transforms from bulk morphology to nanoporous form, featuring numerous grain boundaries and a high hydroxyl content, enhancing its stability and availability of active sites.The resulting electrocatalyst demonstrates a remarkable formate faradaic efficiency (FEformate) exceeding 80 % across a broad potential range (−0.9 to −1.9 V). Notably, a peak FE value of 92 % is achieved for HCOOH production at −1.7 V vs RHE. This study presents a novel and effective method for developing high-performance Sn-based catalysts.