Zeolite-templated synthesis is a versatile route to ordered microporous carbons built with single-walled sp(2) framework of various structures, but the use of hazardous HF to dissolve the zeolite template is still a critical safety issue. We investigated the template-removal process using NaOH and HCl, which are safer than HF. The results indicated that the residual ash content in the carbon could be lowered to less than 5 wt% when the template was removed by consecutive treatments using NaOH and HCl in a proper sequence depending on the zeolite framework type. The carbon obtained in this manner exhibited a rather increased supercapacitance in aqueous media at high current density, as compared to carbons from HF-washing. In the case of the non-aqueous supercapacitor, however, the washing with NaOH-HCl resulted in low capacitance. This was due to the effect of NaOH to generate oxygen-functional groups, which could lead to an increase in the hydrophilicity, and a decrease in the electrical conductivity. Furthermore, the oxygen-functional groups could serve as a base to graft organic amines. When the carbon was heated in H-2, the oxygen content decreased to a similar level to that of the HF-washed carbon, restoring the conductivity and electrochemical energy storage characteristics. (C) 2019 Elsevier Ltd. All rights reserved.