Microporous carbon (MPC) and hierarchically porous carbon (HPC) were designed.
Controlling the pH values endows resulting carbons with tunable pore structures.
MPC shows microporous structure with high surface area of 2068 m2 g−1.
MPC is promising for supercapacitors with a high capacitance of 287 F g−1.