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!







