Three-dimensional (3D) food printing overcomes the drawbacks of bakery industry, especially material loss, high production costs and skilled artesian. This evolving technology can produce a wide variety of food products with personalized shapes, colors, textures, flavors, and nutritional value. Hydrocolloid (xanthan gum) influence the properties of the food system and enhance the structural stability of printed and baked goods. Generally, preparation of cake requires a specialized artesian to create complex shapes, which also results in material waste during preparation. This study investigated the effects of adding various proportion of xanthan gum to cake batter in order to examine the printability and structural stability. Additionally, the impact of xanthan gum on the post-process properties of 3D-printed cakes was analyzed. The findings demonstrated that the addition of xanthan gum enhanced the printability of cake batter and maintained its dimensional stability during baking. Notably, cakes with higher xanthan gum (1.5 and 2.0%) resulted in structural shrinkage, while lower (control and 1.0%) concentration resulted in shape elongation. Optimum shape retention was observed for the cake batter with 1% xanthan gum as indicated by printing precision of 102% and minimal shrinkage of 0.5% during baking. The addition of xanthan gum affects both the specific gravity of the cake batter and specific volume of the cake. However, the color and proximate composition of the cake were maintained. The cake with 1% xanthan gum recorded as most acceptable score on the 9- point hedonic scale. These findings facilitate an evolution in cake production, through the utilization of additive manufacturing techniques.