The aim of this study was to obtain carbon foams (CFs) of various pore structure and high mechanical strength using a simple and efficient method to fabricate carbonization products from bisphenol A-based cyanate ester and their copolymer with low-molecular diglycidyl ether of bisphenol A. The physical–chemical characteristics, surface structure and thermal stability of cured cyanate and cyanate/epoxy matrices as well as the CFs were investigated by vibrational Fourier transform infrared spectroscopy, scanning electron microscopy and thermogravimetric analysis. The relation between the physical–chemical properties of carbon materials obtained and the chemical composition of polymer precursor, and the conditions of their production were determined. The results showed that CF with the pore size of 50–200 μm could be directly prepared by carbonization of the polymer matrix at ambient pressure.