Phenolic-based carbon foams with controllable pore structure and high compressive strength were prepared by foaming of resin solution under the pressure of 4 MPa and then carbonizing. Results showed that the average pore size of carbon foam ranging from 20 to 180 nm can be controlled by changing the resin concentration. The nanometer pore structure resulted in significant improvement of compressive strength and thermal insulation properties of the carbon foams. Carbon foam with bulk density of 0.73 g/cm3, average pore size of 20 nm, compressive strength of 98.3 MPa and thermal conductivity of 0.24 W/mK was obtained.