If youβve ever looked up at the night sky and thought, βWowβ¦β, these cupcakes are your edible version of that moment. These moist chocolate cupcakes are swirled with rich, cosmic-colored buttercream β think deep blues, purples, black, and shimmering silver dust β and they sparkle just like the stars.
Perfect for birthday parties, space-themed events, or any night you want to impress with something dramatic and delicious. Plus, the frosting technique is so forgiving and fun β you really canβt mess this up!
(If youβre into themed bakes, you might also love my Unicorn Cupcakes or this stunning Galaxy Bark!)
β Quick Tip:
- βοΈ Use a touch of black gel food coloring in your frosting base to get a truly deep, starry-night vibe.
Ingredients:
(Makes about 12 cupcakes)
For the cupcakes:
- 1 cup all-purpose flour
- Β½ cup unsweetened cocoa powder
- 1 tsp baking powder
- Β½ tsp baking soda
- ΒΌ tsp salt
- Β½ cup vegetable oil
- 1 cup granulated sugar
- 2 large eggs
- Β½ cup buttermilk
- 1 tsp vanilla extract
- Β½ cup hot coffee (or hot water)
For the galaxy frosting:
- 1 cup unsalted butter, softened
- 4 cups powdered sugar
- 2β3 tbsp heavy cream
- 1 tsp vanilla extract
- Gel food coloring: black, navy, purple, teal
- Edible silver stars or glitter

Instructions:
1οΈβ£ Preheat oven to 350Β°F (175Β°C). Line a muffin tin with black or silver cupcake liners.
2οΈβ£ In a medium bowl, whisk together flour, cocoa powder, baking powder, baking soda, and salt.

3οΈβ£ In a large bowl, whisk oil and sugar until combined. Add eggs, one at a time, then mix in buttermilk and vanilla.

4οΈβ£ Add dry ingredients to wet and mix just until combined. Pour in hot coffee and stir β batter will be thin.
5οΈβ£ Divide batter into liners and bake 18β20 minutes, until a toothpick comes out clean. Cool completely before frosting.

6οΈβ£ For frosting, beat butter until creamy. Gradually add powdered sugar, heavy cream, and vanilla until fluffy.
7οΈβ£ Divide frosting into 3β4 bowls and tint each with navy, purple, teal, and a touch of black. Spoon dollops of each color randomly into a piping bag fitted with a star tip, then pipe onto cupcakes to create a galaxy swirl.


8οΈβ£ Sprinkle with edible silver glitter or star sprinkles.

π Serving Tips:
- Arrange on a black cake stand with fairy lights to mimic stars.
- Pair with a galaxy punch (blue lemonade with edible glitter).
- Wrap each in clear cello bags with metallic ribbon for party favors.
π Creative Variations:
- Add a teaspoon of espresso powder to the batter for a mocha vibe.
- Use cream cheese frosting instead of buttercream for a tangier twist.
- Make mini galaxy cupcakes for a bite-sized starry treat.
π§ Troubleshooting:
- If colors blend too much, chill frosting slightly before piping.
- If cupcakes are too dry, be sure not to overbake β check at 16 minutes.
- If your black isnβt deep enough, let the color develop for 10 minutes after mixing.
π§ Storage Info:
- Store in an airtight container at room temp for up to 2 days.
- Refrigerate up to 5 days, bring to room temp before serving.
- Freeze unfrosted cupcakes for up to 2 months.

Galaxy Cupcakes
Ingredients
For the cupcakes:
- 1 cup all-purpose flour
- Β½ cup unsweetened cocoa powder
- 1 tsp baking powder
- Β½ tsp baking soda
- ΒΌ tsp salt
- Β½ cup vegetable oil
- 1 cup granulated sugar
- 2 large eggs
- Β½ cup buttermilk
- 1 tsp vanilla extract
- Β½ cup hot coffee or hot water
For the galaxy frosting:
- 1 cup unsalted butter softened
- 4 cups powdered sugar
- 2 β3 tbsp heavy cream
- 1 tsp vanilla extract
- Gel food coloring: black navy, purple, teal
- Edible silver stars or glitter
Instructions
- 1οΈβ£ Preheat oven to 350Β°F (175Β°C). Line a muffin tin with black or silver cupcake liners.
- 2οΈβ£ In a medium bowl, whisk together flour, cocoa powder, baking powder, baking soda, and salt.
- 3οΈβ£ In a large bowl, whisk oil and sugar until combined. Add eggs, one at a time, then mix in buttermilk and vanilla.
- 4οΈβ£ Add dry ingredients to wet and mix just until combined. Pour in hot coffee and stir β batter will be thin.
- 5οΈβ£ Divide batter into liners and bake 18β20 minutes, until a toothpick comes out clean. Cool completely before frosting.
- 6οΈβ£ For frosting, beat butter until creamy. Gradually add powdered sugar, heavy cream, and vanilla until fluffy.
- 7οΈβ£ Divide frosting into 3β4 bowls and tint each with navy, purple, teal, and a touch of black. Spoon dollops of each color randomly into a piping bag fitted with a star tip, then pipe onto cupcakes to create a galaxy swirl.
- 8οΈβ£ Sprinkle with edible silver glitter or star sprinkles.
Notes
- Donβt worry about perfect swirls β random is good here!
- If you donβt have buttermilk, add Β½ tsp vinegar to regular milk and let it sit 5 minutes.
π If you bake up these little cosmic beauties, tag me on Pinterest or Instagram β Iβd love to see your galaxy magic!