Mechanically strong SiOC foams were prepared via pyrolysis of polysiloxane composites, into which 20–70wt% of epoxy powder were incorporated as sacrificial filler. The chosen epoxy filler degrades practically quantitatively during the pyrolysis in nitrogen, due to a high content of polyoxypropylene chains. The pyrolysis of the composite precursors yielded SiOC foams with apparent densities between 1.31 and 0.62g/cm3, which corresponded to macro-porosities of 35–69%. A hierarchical porosity was obtained due to a relatively wide distribution of the sacrificial filler grains׳ size. Compressive strength between 15 and 38MPa was achieved, depending on the apparent density of the SiOC foams: the best result was obtained for the foam with 56% porosity. In the case of denser foams, their strength was reduced by the presence of pyrolysis cracks, while at 70% porosity, the thinner pore walls led to a reduced strength. The elastic modulus of the most promising foam (56% porosity) was found to be 10GPa.