Summer evenings feel like pure nostalgia in a jar when fireflies dance through the twilight, creating nature’s own light show. The Firefly Jar Cake captures this seasonal magic in an innovative dessert that’s become the most talked-about treat of 2025. This enchanting creation combines a simple cake recipe with UV-reactive frosting to mimic the glow of fireflies against a night sky backdrop, all presented in charming mason jars.
What makes this dessert truly special is its transformative quality – in normal lighting, it looks like a lovely decorated jar cake, but under blacklight, it becomes a mesmerizing display that wows party guests of all ages. The Firefly Jar Cake isn’t just delicious; it’s an interactive experience that brings a touch of wonder to any gathering. Perfect for outdoor summer parties, nighttime celebrations, or anytime you want to add some unexpected joy to your dessert table.
🍰 Believe it or not, you can make a cake just like this one! Check out CakeFlix for a free 7-day trial and learn step-by-step.


Firefly Jar Cake
Equipment
- 8-Inch Cake Pans
- Offset spatula
- Blacklight
Ingredients
- 2 1/2 cups all-purpose flour
- 3/4 cup unsweetened cocoa powder dark or black cocoa for deep color
- 2 tsp baking soda
- 1 tsp baking powder
- 1/2 tsp salt
- 1 cup unsalted butter softened
- 1 3/4 cups granulated sugar
- 3 large eggs
- 1 tbsp vanilla extract
- 1 cup buttermilk
- 1/2 cup hot coffee enhances chocolate flavor
- 3 cups buttercream frosting divided
- 1 tbsp black gel food coloring for night sky effect
- 1/2 cup tonic water for UV-reactive glow
- 1/4 tsp vitamin B2 powder optional, enhances glow
- 1 tbsp yellow gel food coloring for fireflies
Instructions
- Preheat the oven to 350°F (175°C) and grease two 8-inch cake pans.
- In a mixing bowl, whisk together the flour, cocoa powder, baking soda, baking powder, and salt. Set aside.
- In another bowl, beat the butter and sugar with an electric mixer until light and fluffy.
- Add the eggs one at a time, mixing well after each addition, then stir in the vanilla extract.
- Gradually add the dry ingredients, alternating with buttermilk and hot coffee, mixing until just combined.
- Divide the batter evenly between the prepared cake pans and smooth the tops.
- Bake for 28-30 minutes, or until a toothpick inserted into the center comes out clean.
- Let the cakes cool in the pans for 10 minutes, then transfer to a cooling rack to cool completely.
- Tint half of the buttercream frosting black using the black gel food coloring and set aside.
- For the firefly frosting, mix the tonic water with the remaining buttercream and tint it yellow. Add vitamin B2 powder for extra glow.
- Frost the entire cake with the black buttercream to create a night sky effect.
- Using a piping bag, pipe small dots of the yellow UV-reactive frosting onto the cake to resemble glowing fireflies.
- Chill the cake for 30 minutes before serving. Display under a blacklight to reveal the glowing fireflies!
Notes
- Storage: Store in the refrigerator for up to 5 days. Bring to room temperature before serving.
- UV Effect: Tonic water and vitamin B2 enhance the glow under blacklight. The stronger the UV light, the brighter the effect.
- Extra Decoration: Add edible glitter or neon-colored stars to enhance the nighttime scene.
Nutrition
Capturing Summer Memories in a Dessert
The Firefly Jar Cake emerged from the collective childhood memory of catching fireflies on warm evenings. This nostalgic activity, where children would temporarily capture lightning bugs in mason jars to observe their magical glow, has been reimagined as a delightful dessert experience. The concept first appeared on social media in early 2024 but has reached peak popularity this year as bakers discovered how to perfect the UV-reactive elements.
What began as a niche creation has quickly become a mainstream sensation, with variations appearing at upscale bakeries and home kitchens alike. Unlike other trending desserts that require professional skills, the Firefly Jar Cake remains accessible to bakers of all levels. Its charm lies in the playful presentation and interactive element – guests are genuinely surprised when the room darkens and the “fireflies” begin to glow.

The beauty of this dessert is that it combines simple baking techniques with a dash of food science. UV-reactive food coloring (FDA-approved and food-safe) creates the illusion of glowing insects without any artificial additives or concerning chemicals. This blend of innovation in baking and childhood whimsy makes the Firefly Jar Cake irresistible to both kids and adults experiencing a bit of nostalgic joy.
Essential Ingredients and Equipment
Before diving into making your Firefly Jar Cake, gather these essential ingredients:
- 2 cups all-purpose flour
- 2 tablespoons cornstarch
- 1 teaspoon salt
- 2 teaspoons baking powder
- ½ cup (1 stick) unsalted butter, softened
- 1½ cups granulated sugar
- 4 egg whites, room temperature
- ⅓ cup canola oil
- 1 cup whole milk
- 2 teaspoons vanilla extract
- ½ cup rainbow sprinkles
- 4 cups powdered sugar (for frosting)
- UV-reactive yellow food coloring or premade UV-reactive yellow frosting
You’ll also need the following equipment to create your glowing jar masterpiece:
- 9×13 or 7×11 inch jelly roll pan
- Parchment paper
- Electric mixer (stand or hand)
- Assorted circle cookie cutters (sizes to fit your mason jars)
- 6-8 mason jars (8oz size works well)
- Piping bags with small round tips
- Blacklight (for serving/display)
- Offset spatula
- Cooling rack
The UV-reactive food coloring is what creates the magical glowing effect in this cake. You can find this special food coloring online or at specialty baking stores. If you’re having trouble finding it locally, several online retailers specializing in baking supplies stock these products, and they ship nationwide. For those interested in more glow-in-the-dark desserts, the same coloring can be used for other creative treats.

Creating Your Magical Firefly Jar Cake
Follow these detailed steps to create a stunning Firefly Jar Cake that will amaze your guests:
1. Prepare and Bake the Cake
- Preheat your oven to 350°F (175°C). Grease your jelly roll pan with butter or vegetable shortening and line with parchment paper, leaving an overhang on the sides for easy removal.
- In a medium bowl, whisk together flour, cornstarch, baking powder, and salt. Set aside.
- In a large mixing bowl, cream butter and sugar until light and fluffy, about 3-4 minutes.
- Add egg whites one at a time, mixing well after each addition. Mix in canola oil and vanilla extract until combined.
- Alternate adding the dry ingredients and milk to the butter mixture, beginning and ending with the dry ingredients. Mix just until combined.
- Gently fold in rainbow sprinkles, being careful not to overmix.
- Pour the batter into the prepared pan, spreading it evenly.
- Bake for 8-12 minutes or until a toothpick inserted in the center comes out clean.
- Let cool in the pan for 10 minutes, then use the parchment overhang to transfer to a cooling rack. Cool completely.
2. Prepare the Frosting
- In a large bowl, beat butter until creamy and smooth.
- Gradually add powdered sugar, vanilla, and a pinch of salt, mixing on low until incorporated.
- Increase speed to medium-high and beat until light and fluffy, about 3-4 minutes.
- Divide the frosting – keep most of it white, and tint a small portion with the UV-reactive yellow coloring. Place the yellow frosting in a piping bag fitted with a small round tip.
3. Assemble the Jar Cakes
- Once the cake has cooled completely, use circle cookie cutters to cut rounds that will fit inside your mason jars. The size will depend on your jars.
- Place a cake round at the bottom of each jar.
- Add a layer of white frosting on top of the cake.
- Repeat with cake and frosting layers until the jar is about ¾ full.
- For the final layer of frosting, create a smooth dark surface (you can tint some frosting black or dark blue for a more dramatic effect).
- Using the piping bag with yellow UV-reactive frosting, add small dots scattered across the dark frosting to resemble fireflies.
- You can add additional details like small grass silhouettes using green frosting at the bottom if desired.
The key to a successful Firefly Jar Cake is patience with the assembly process. Take your time layering the cake and frosting in the jars, and be mindful not to press down too firmly, which could cause the layers to compress. The final effect of the glowing “fireflies” against the dark background creates a stunning visual that resembles magical illuminated treats perfect for evening gatherings.

Full Firefly Jar Cake Recipe
Prep Time: 30 minutes
Cook Time: 10 minutes
Assembly Time: 20 minutes
Total Time: 1 hour
Servings: 6-8 jar cakes
Yield: 6-8 individual jar cakes
Nutritional Information (per serving):
- Calories: 475
- Protein: 4g
- Fat: 21g
- Saturated Fat: 10g
- Carbohydrates: 70g
- Sugar: 55g
- Fiber: 0.5g
- Sodium: 220mg
Equipment:
- 9×13 or 7×11 inch jelly roll pan
- Parchment paper
- Electric mixer
- Circle cookie cutters
- 6-8 mason jars (8oz)
- Piping bags and small round tips
- Offset spatula
- Blacklight (for serving)
Ingredients:
For the Cake:
- 2 cups all-purpose flour
- 2 tablespoons cornstarch
- 1 teaspoon salt
- 2 teaspoons baking powder
- ½ cup (1 stick) unsalted butter, softened
- 1½ cups granulated sugar
- 4 egg whites, room temperature
- ⅓ cup canola oil
- 1 cup whole milk
- 2 teaspoons vanilla extract
- ½ cup rainbow sprinkles
For the Frosting:
- 1 cup (2 sticks) unsalted butter, softened
- 4 cups powdered sugar
- 2 teaspoons vanilla extract
- 2-3 tablespoons milk or heavy cream
- Pinch of salt
- UV-reactive yellow food coloring
- Black or dark blue food coloring (optional)
Instructions:
- Preheat oven to 350°F (175°C). Grease and line the jelly roll pan with parchment paper.
- Whisk dry ingredients (flour, cornstarch, salt, baking powder) in a medium bowl.
- In a large bowl, cream butter and sugar until fluffy. Add egg whites one at a time, then oil and vanilla.
- Gradually add dry ingredients and milk, alternating between the two. Fold in sprinkles.
- Pour batter into the prepared pan and spread evenly. Bake for 8-12 minutes until a toothpick comes out clean.
- Cool in pan for 10 minutes, then transfer to a cooling rack using the parchment paper. Cool completely.
- For the frosting, beat butter until creamy. Gradually add powdered sugar, vanilla, and salt. Add milk as needed to reach desired consistency.
- Divide frosting and tint a small portion with UV-reactive yellow coloring. If desired, tint another portion black or dark blue.
- Cut cake into circles to fit mason jars using cookie cutters.
- Layer cake and white frosting in jars, ending with a dark-tinted frosting layer on top.
- Pipe small dots of UV-reactive yellow frosting on the dark surface to create fireflies.
- Seal jars with lids until ready to serve. For best effect, display under a blacklight.
Recipe Notes:
- The cake recipe yields a thin sheet cake specifically designed for layering in jars. Don’t worry if it seems thinner than traditional cakes.
- For maximum UV reactivity, ensure your blacklight is positioned correctly when displaying the cakes.
- The frosting recipe makes enough for 6-8 jar cakes with some extra for decoration.
- If UV-reactive food coloring isn’t available, regular yellow with a touch of green creates a similar visual effect, though it won’t glow under blacklight.
Creative Variations and Pro Tips
The Firefly Jar Cake offers plenty of room for creative personalization and experimentation. Try these exciting variations to make the recipe your own:
- Flavor Variations: Swap the vanilla cake for chocolate, lemon, or even vanilla bean infused batter. The dark chocolate cake creates an especially dramatic backdrop for the glowing fireflies.
- Seasonal Themes: Adapt the concept for different seasons – snowflakes in winter, flowers in spring, or stars for a galaxy theme.
- Dietary Adaptations: Make the cake gluten-free by substituting a quality gluten-free flour blend, or try a vegan-friendly version using plant-based butter and milk.
- Filling Options: Add fruit preserves, chocolate ganache, or caramel between cake layers for additional flavor dimensions.
- Presentation Ideas: Create a gradient effect by tinting the frosting layers from light to dark blue to mimic the dusk sky.
Here are some professional tips to ensure your Firefly Jar Cake turns out perfectly every time:
- For the clearest glow effect, keep your dark frosting layer as smooth as possible.
- Test your UV-reactive frosting under a blacklight before decorating to ensure it produces the desired glow intensity.
- Chill the jars between layers to help the frosting set, creating cleaner, more defined layers.
- Use a piping bag with a very small round tip (size 1 or 2) for the firefly dots to keep them precise and tiny.
- For a more dramatic effect, add a few larger “fireflies” among the smaller ones to create depth.
The most common mistake beginners make is applying the firefly dots too large or too densely. Remember that real fireflies appear as tiny, scattered points of light – spacing them irregularly creates the most natural and magical effect.
Storing Your Firefly Jar Cake
Proper storage is crucial for maintaining the freshness and appearance of your Firefly Jar Cake. The good news is that the mason jar format actually helps preserve the cake naturally. When storing Firefly Jar Cake, always make sure the jars have cooled completely before sealing them, as trapped heat can create condensation and make the cake soggy.
For short-term storage (1-3 days), simply screw the lids onto your mason jars and place them in the refrigerator. The sealed environment keeps the cake moist while preventing it from absorbing refrigerator odors. If you’ve created the cakes without lids for immediate serving, cover the tops with plastic wrap before refrigerating.
For longer storage of Firefly Jar Cake, freezing works remarkably well. Ensure the lids are tightly secured and place the jars in the freezer, where they’ll maintain quality for up to 3 months. When ready to enjoy, transfer Firefly Jar Cake from the freezer to the refrigerator and thaw overnight. Allow them to come to room temperature for about 30 minutes before serving for the best flavor and texture.
The UV-reactive elements in your Firefly Jar Cake may gradually lose some intensity over extended storage periods. For the most vibrant glow effect, it’s best to add the firefly decoration no more than 24 hours before serving. If you’re planning ahead, you can assemble the cake layers and basic frosting in advance, then add the glowing firefly details just before your event.


Bringing Summer’s Glow to Every Celebration
The Firefly Jar Cake represents more than just a dessert – it captures a fleeting moment of summer wonder in an edible form. By combining simple baking techniques with a touch of food science innovation, you’ve created an interactive treat that brings joy and amazement to friends and family. The beauty of this recipe lies in its adaptability – make it for outdoor summer gatherings, birthday celebrations, or anytime you want to add a touch of unexpected delight to your dessert table.
Don’t be surprised if your guests ask for the recipe or request these magical treats for their own events. The combination of delicious cake, creamy frosting, and the surprising glow effect makes this dessert unforgettable. Consider hosting a baking party where everyone can customize their own Firefly Jar Cake – it’s an activity and dessert all in one!
Remember that the true magic happens when the lights dim and those tiny frosting dots begin to glow. For your next gathering, pair these cakes with other illuminated decorations or serve them during sunset for the most dramatic effect. The Firefly Jar Cake proves that sometimes the most memorable desserts combine nostalgic elements with a dash of innovation – capturing childhood wonder in a jar that everyone can enjoy.