Earthworms are known to play an important role in soil processes, especially in the regeneration of soil structure. However, quantitative studies about their role on soil physical properties are still scarce. In this study the effects of two earthworm species (Nicodrilus nocturnus as anecic, Allolobophora icterica as endogeic) following three treatments (N. nocturnus only, A. icterica only and both species with 80% weight of N. nocturnus and 20% of A. icterica) on soil specific volumes and pore properties are evaluated in mesocosms (30 cm height and 15 cm diameter) for a loamy Anthrosol and a silt loam Luvisol. The soils were repacked to bulk density observed in the field (1,15 and 1,25 g cm−3 respectively) and to compacted bulk density (1,4 and 1,5 g cm−3 respectively). Except earthworm-free controls, introduced earthworm biomass was close to 500 g.m−2. The experiment lasted 23 weeks, under constant temperature and soil matrix potential, and earthworms were fed with hay. The impact of earthworms on soil porosities and specific volumes was assessed using (i) computed tomography on mesocosm and (ii) shrinkage analysis on undisturbed cubic samples (150 cm3). Anecic surface cast bulk density was determined after wax coating. At mesocosm scale, the specific volume of compacted soils increased significantly with the anecic and mixed earthworm treatments (+1.9% for the Anthrosol and +2.6% for the Luvisol), while no change was observed with endogeics regardless of the initial level of compaction or the soil type. After subtracting the burrow volumes, the remaining soil matrix specific volume showed significant decrease with earthworms in case of loose soils, particularly with endogeics with 5.6% decrease of the specific soil matrix volume, while the compacted soil matrix was not decompacted. At undisturbed cubic sample scale, shrinkage analysis confirmed these observations with earthworms decreasing the larger structural pores and promoting a more rigid plasma. Anecic surface casts showed intermediate bulk density (0.82 cm3 g−1 for the Anthrosol and 0.73 cm3 g−1 for the Luvisol) between compacted (0.73 cm3 g−1 for the Anthrosol and 0.67 cm3 g−1 for the Luvisol) and loose (0.88 cm3 g−1 for the Anthrosol and 0.81 cm3 g−1 for the Luvisol) soil matrices. We concluded that the decompaction effect of earthworms was due to the opening of burrows at mesocosm soil scale, while the matrix volume was i) either compacted in case of loose soil especially with endogeics at the expense of the >150 µm equivalent radius structural pores or ii) unchanged in case of compacted soil. Our results support the conclusion that earthworms alone cannot regenerate the matrix of compacted soils and even compact the soil matrix in case of loose soils.