Space Cake With a Hidden Galaxy Inside
In this article
A space cake with a hidden galaxy inside is a vanilla or chocolate cake baked in a round pan, then filled with a swirl of colored batter that reveals stars and a spiral when you cut it. The surprise comes from layering small dots and a spiral of tinted batter between plain layers, so the crumb looks like a night sky. It suits a birthday, a weekend baking project, or a bake sale where you want a slice that makes people look twice.
Serves 10 · Prep 40 min · Cook 45 min · Total 2 hr 5 min
Ingredients
- 2 1/2 cups (315 g) all-purpose flour
- 2 1/2 tsp baking powder
- 1/2 tsp salt
- 1 cup (225 g) unsalted butter, softened
- 1 1/2 cups (300 g) granulated sugar
- 4 large eggs, room temperature
- 1 tbsp vanilla extract
- 1 cup (240 ml) whole milk, room temperature
- Gel food coloring: black or deep purple, blue, pink, and white
- 1 tbsp cocoa powder (optional, for a darker base)
Instructions
- Heat the oven to 350°F (175°C). Grease and line the bottom of a 9-inch (23 cm) round cake pan with parchment. If you only have an 8-inch (20 cm) pan, the cake will be taller and need 5-10 extra minutes.
- Whisk the flour, baking powder, and salt in a bowl. Set aside.
- Beat the butter and sugar with an electric mixer on medium speed for 3-4 minutes, until pale and fluffy. Scrape the bowl.
- Add the eggs one at a time, beating well after each. Beat in the vanilla. The mixture may look slightly curdled; that is normal.
- Add the flour mixture in three additions, alternating with the milk in two additions, starting and ending with flour. Mix on low just until combined. Do not overmix.
- Divide the batter: about 1 1/2 cups (360 ml) for the plain base, and the rest split into four small bowls. Tint one bowl black or deep purple, one blue, one pink, and one white. Stir a few drops at a time; gel colors are strong.
- Pour the plain base batter into the pan and smooth the top. Spoon small dots of the colored batters over the surface. Use a skewer or thin knife to draw a spiral through the dots, starting at the center and working outward. Do not stir; you want distinct patches, not a muddy blend.
- Bake at 350°F (175°C) for 40-45 minutes, until the top springs back when pressed lightly and a toothpick inserted in the center comes out with a few moist crumbs. If the top browns too fast, tent with foil after 30 minutes.
- Cool in the pan for 10 minutes, then turn out onto a rack to cool completely, about 1 hour. Slice with a sharp knife to reveal the galaxy pattern.
The Galaxy Pattern Comes From Dots, Not Stirring
The hidden design works because the colored batter stays in separate pockets. If you swirl too much, the colors blend into a gray-brown streak. Keep the dots small, about 1/2 inch (1 cm) wide, and space them 1 inch (2.5 cm) apart. Draw the skewer through in one continuous spiral, wiping it clean between passes. For a starry look, add a few tiny white dots on top of the darker patches before baking.
If you want a more defined spiral, pipe the colored batter from a zip-top bag with the corner snipped off. That gives you control and keeps the dots round. A chocolate base batter also works: replace 1/4 cup (30 g) of the flour with cocoa and add 2 tbsp (30 ml) extra milk. The darker crumb makes the colored dots stand out more.
Scaling for Half or Double Batches
This recipe makes one 9-inch (23 cm) round cake, about 10 slices. For a half batch, use a 6-inch (15 cm) pan and bake at 350°F (175°C) for 30-35 minutes. For a double batch, use two 9-inch pans or one 9x13-inch (23x33 cm) sheet pan; the sheet pan takes 35-40 minutes. The table below gives the exact amounts.
| Ingredient | Half batch | Full batch | Double batch |
|---|---|---|---|
| All-purpose flour | 1 1/4 cups (155 g) | 2 1/2 cups (315 g) | 5 cups (630 g) |
| Baking powder | 1 1/4 tsp | 2 1/2 tsp | 5 tsp |
| Salt | 1/4 tsp | 1/2 tsp | 1 tsp |
| Butter | 1/2 cup (115 g) | 1 cup (225 g) | 2 cups (450 g) |
| Sugar | 3/4 cup (150 g) | 1 1/2 cups (300 g) | 3 cups (600 g) |
| Eggs | 2 | 4 | 8 |
| Vanilla | 1 1/2 tsp | 1 tbsp | 2 tbsp |
| Milk | 1/2 cup (120 ml) | 1 cup (240 ml) | 2 cups (480 ml) |
Serving and Storing the Cake
Serve the cake at room temperature with a spoonful of whipped cream or a scoop of vanilla ice cream. The cold cream contrasts with the soft crumb. For a party, dust the top with a little powdered sugar just before serving; it looks like stars and hides any uneven spots.
Store leftovers covered at room temperature for up to 2 days, or refrigerate for up to 4 days. Wrap tightly; the cut edges dry out first. To freeze, wrap individual slices in plastic wrap and foil, then freeze for up to 2 months. Thaw at room temperature for 1-2 hours. Do not refreeze thawed cake.
What Goes Wrong and How to Fix It
If the colored dots sink to the bottom, your batter is too thin. Chill the colored batters for 10 minutes before dotting, or add 1 tbsp (8 g) flour to each small bowl. If the colors bleed, you stirred too much; next time, drop the dots and spiral once only. If the cake domes and cracks, the oven is too hot; check with an oven thermometer and reduce to 325°F (165°C) if needed. A dry cake means it baked too long; start checking at 35 minutes.