Polysilazane (PSN2) was used as chemical foaming agent to prepare epoxy foam for the first time. Using the new foaming agent, epoxy foams with high strength and low density were successfully prepared. The density of epoxy foam can be tuned from 0.321 to 0.151 g cm
−3
by changing the content of PSN2 from 2.50 to 7.50 wt%, with the compressive strength varied from 7.39 to 1.25 MPa. The morphology, porosity, mechanical property, thermal conductivity and adhesive property of foams with different polysilazane content were investigated. Besides, the effect of polyamine curing agent and surfactant on foams was also investigated to optimize the as-prepared epoxy foam.