The impact of sugar (17.6–31.2%) and fat (8.7–15.8%) levels on cookie structure was studied. Cookie diameter increased and its height decreased with increasing sugar or fat levels. X-ray microfocus computed tomography porosities and cell sizes increased with fat level, but cell size distribution, cell wall thickness and distribution were not affected by fat level, indicating that fat primarily incorporates air. In contrast, the sugar level influenced porosity, cell size, cell wall thickness and their relative distributions. Thus, the sucrose level, probably by affecting dough viscosity during baking, largely influences the baked cookie structure. Cell and cell wall anisotropy measurements indicated that the inner orientation of cells and cell walls probably depends on the horizontal spread behaviour, rather than on the maximum cookie height and collapse. Finally, the surface cracking pattern was determined by sugar level, rather than by structural collapse at the end of baking.