A series of true triaxial compression tests was performed herein on cubic red sandstone samples containing a D-shaped hole with three sidewall sizes to study the influence of sidewall size on spalling in D-shaped tunnels. The initial horizontal stress of the tests refers to the in-situ stress at 500 m depth. The hole axis was arranged along the direction of the maximum horizontal principal stress. The vertical stress was increased to simulate the increasing surrounding rock stress after tunnel excavation. During the test, a self-made monitoring device was used to monitor and record the failure process of the tunnel models in real time. Furthermore, the spalling process of the D-shaped tunnels with different sidewall sizes was reproduced indoors. The failure process and the stress and fracture characteristics of the tunnel models with three different sidewall sizes were then analyzed and summarized. The effect of the sidewall size on spalling in D-shaped tunnels will be discussed in this paper. The results show that the failure of the tunnel models with different sidewall sizes first occurred on the sidewall near the corner then gradually developed upward and axial along the sidewall with the increase of the vertical stress. The width and the depth of the failure zone gradually increased, and a V-shaped notch was finally formed on the sidewall. No failure occurred on the roof and the floor of the tunnel models. The dominant failure modes were tensile failure. The failure forms were mainly spalling occasionally accompanied by slab ejection. The slabs were shaped in thin plates. The vertical stress that caused the initial failure of the tunnel models gradually decreased with the increasing sidewall size. Furthermore, the ability of the surrounding rock to store elastic strain energy decreased. The tensile characteristics became more prominent, and the size of the plate-shaped slabs increased. In the same stress environment, the greater the sidewall size, the larger the failure width and depth on the sidewall, and the more visible the V-shaped failure zone. The stability of deep D-shaped tunnels can be improved, and spalling can be mitigated by reducing the sidewall size. However, the risk of a rockburst will increase. This finding has an important engineering significance for the optimization design of a tunneling cross-section and the prevention of spalling and rockburst in D-shaped tunnels.