Chocolate Zucchini Cake

Super moist and indulgent chocolate zucchini cake is studded with chocolate chips and topped with chocolate fudge frosting. Made with 3 cups of shredded zucchini (you can’t taste it!), this is the most decadent way to eat your greens.

I originally published this recipe in 2017 and have since added new photos, a video tutorial, and additional success tips.

cake server removing slice of chocolate zucchini cake.

Today, we have a triple dose of chocolate in the form of luxuriously rich chocolate zucchini cake. No, you can’t taste the zucchini. No, you can’t see the zucchini. Yes, it’s unbelievably delicious and I’m showing you exactly how to make it! Zucchini recipes have never been more decadent than this one. 🙂

Can you just look at how rich and moist this cake is? It tastes even better than it looks, I swear. The real secret behind it is the hidden vegetable inside. If you’re one who believes these veggies should only be in zucchini casserole, zucchini fritters, or zucchini biscuits and have nothing to do with dessert, keep an open mind. Carrot cake, anyone?!


Why You’ll Love This Chocolate Zucchini Cake

  • Just as loved as my chocolate cake
  • Super moist and rich with mega chocolate flavor
  • Easy to make
  • A delicious way to use up a bumper crop of summer zucchini
  • 3 cups of vegetables hiding inside—and you don’t even taste it
  • Covered in fudge-like chocolate buttercream

One reader, Stacie, commented:Delicious chocolate cake! No evidence of three cups of zucchini in there! So good!!! ★★★★★

One reader, Emily, commented:This was amazing! Probably the best chocolate cake we’ve ever had—so moist! And no one even guessed there was zucchini in it. ★★★★★

One reader, Kara, commented:This wasn’t just the best zucchini recipe I’ve ever tried, it was the best cake recipe as well! The zucchini here makes this moist and fudgy, almost like a brownie, but still fluffy like cake. I used cream cheese frosting and it was divine. I will be making this for birthdays in the future! ★★★★★

fork with a bite of a slice of chocolate zucchini cake.

Overview: Chocolate Zucchini Cake Ingredients

This decadent cake is made with fresh zucchini and pantry basics. Did you know that cocoa powder can dry out baked goods much more than flour? To compensate for this, we ensure there’s plenty of added moisture in the cake batter.

Let’s review a few key ingredients:

  • Unsweetened Natural Cocoa Powder: Cocoa powder takes the place of some flour. Just as in my regular chocolate cake recipe, make sure you’re using natural unsweetened cocoa powder instead of Dutch-process cocoa powder.
  • Espresso Powder: Espresso powder accentuates the chocolate flavor. While optional, I highly recommend using it. The chocolate zucchini cake won’t taste like coffee. Rather, the espresso powder helps bring out the intense chocolate flavor. We use it in chocolate zucchini bread and in this chocolate cake roll, too. You can find espresso powder in the coffee aisle at the grocery store or online.
  • Oil: Oil adds moisture. You can try replacing *some* of the oil with unsweetened applesauce. I’ve done this with chocolate cakes and muffins and the result is wonderful, but I don’t recommend replacing all of it. Despite the zucchini inside, this isn’t health food, it’s dessert. Don’t try to make it into something it’s not!
  • Eggs: 4 eggs bind everything together and add moisture. Remember that room-temperature ingredients are important.
  • Sour Cream: Just like in chocolate peanut butter cake, you can use sour cream or plain yogurt. Either add moisture.
  • Zucchini: Use a whopping 3 cups of shredded zucchini in this recipe. Testing how much we can get away with… without actually tasting it! Zucchini is pure magic in cakes—nothing but flavorless moisture. Same goes with my zucchini bread, apple zucchini bread, and zucchini muffins, too!

Optional Chocolate Chips: For mega chocolate flavor, add chocolate chips to the batter. They’re key to those melty pockets of chocolate in each slice. I use semi-sweet chocolate chips (just like in my peanut butter chocolate chip zucchini bread), but mini chocolate chips or even dark chocolate chips pair wonderfully, too.

ingredients on marbled surface including chocolate chips, cocoa powder, oil, flour, eggs, espresso powder, brown sugar, and sour cream.
shredded zucchini on cutting board

Let Me Show You How to Make It:

This chocolate zucchini cake comes together quickly and easily, just like my regular zucchini cake. Simply whisk the dry ingredients in one bowl and beat the wet ingredients together in another bowl. Combine the wet and dry ingredients, then add the chocolate chips. The cake batter will be slightly thick thanks to all of the zucchini! Divide the batter between two 9-inch cake pans; or you can make a quarter sheet cake using a 9×13-inch cake pan. See the recipe Notes section for details.

  • Need cupcakes instead? This recipe yields about 24–30 cupcakes. See recipe Notes.
chocolate batter in glass bowl and shown again in 2 round cake pans.
chocolate cakes in round cake pans on gold cooling rack.

Chocolate Frosting

We’re topping and filling this chocolate zucchini cake with smooth, silky, and creamy chocolate buttercream. You’ll use my favorite chocolate buttercream recipe, but increase the quantity as directed in the recipe card below.

How to Assemble a Layer Cake

If you’re new to assembling and layering cakes, or if you just need a refresher, see my How to Assemble a Layer Cake video tutorial. The quick video guide will walk you through how to stack and decorate it.

If you would rather top this cake with vanilla frosting, use the vanilla frosting included in my white cake recipe. Regardless of which you choose, you’ll have enough frosting to frost the entire layer cake AND a little leftover for some fun piping on top. Decorate however you’d like! I used Wilton 1M for the pictured piping:

chocolate frosting in glass bowl with blue spatula and shown again being spread on chocolate cake layer.
close-up of piped chocolate frosting with chocolate sprinkles and mini chocolate chips.
chocolate zucchini cake on marble and wood cake stand.

Deep, dark, luxuriously rich, crazy moist, and weirdly loaded with vegetables that you absolutely can’t taste. After one bite you’ll be convinced this is the best way to eat your veggies! You’ll love my zucchini oatmeal chocolate chip cookies, too.

More Chocolate Recipes

slice of chocolate zucchini cake with chocolate frosting on beige plate.
Print
clock clock iconcutlery cutlery iconflag flag iconfolder folder iconinstagram instagram iconpinterest pinterest iconfacebook facebook iconprint print iconsquares squares iconheart heart iconheart solid heart solid icon
slice of chocolate zucchini cake with chocolate frosting on beige plate.

Chocolate Zucchini Cake

4.9 from 226 reviews
  • Author: Sally McKenney
  • Prep Time: 15 minutes
  • Cook Time: 30 minutes
  • Total Time: 3 hours, 30 minutes
  • Yield: serves 10-12
  • Category: Dessert
  • Method: Baking
  • Cuisine: American
Save Recipe

Description

This super rich and moist chocolate zucchini cake is topped with the best chocolate frosting—you won’t even taste the vegetables!


Ingredients

Cake

  • 2 cups (250g) all-purpose flour (spooned & leveled)
  • 3/4 cup (62g) unsweetened natural cocoa powder
  • 2 teaspoons baking soda
  • 1/2 teaspoon baking powder
  • 1 teaspoon espresso powder (optional)
  • 1/2 teaspoon salt
  • 1 cup (240ml) canola or vegetable oil
  • 1 cup (200g) granulated sugar
  • 3/4 cup (150g) packed light or dark brown sugar
  • 4 large eggs, at room temperature
  • 1/3 cup (80g) sour cream or plain yogurt, at room temperature
  • 2 teaspoons pure vanilla extract
  • 3 cups (about 360g) shredded zucchini (lightly blotted; see recipe Note) (2 medium zucchini, about .751 lb.)
  • 1 cup (180g) semi-sweet chocolate chips (regular or mini)

Chocolate Buttercream

  • 1 and 1/4 cups (282g) unsalted butter, softened to room temperature
  • 3 and 1/2 cups (420g) confectioners’ sugar
  • 3/4 cup (62g) unsweetened cocoa powder (natural or Dutch-process)
  • 35 Tablespoons (45–75ml) heavy cream (or half-and-half or whole milk), at room temperature
  • 1/4 teaspoon salt
  • 1 teaspoon pure vanilla extract
  • optional for decoration: chocolate chips and/or chocolate sprinkles


Instructions

  1. Preheat oven to 350°F (177°C). Grease two 9-inch round cake pans, line with parchment paper rounds, then grease the parchment paper. Parchment paper helps the cakes seamlessly release from the pans. (If it’s helpful, see this parchment paper rounds for cakes video & post.)
  2. Make the cake: Whisk the flour, cocoa powder, baking soda, baking powder, espresso powder (if using), and salt together in a large bowl. In another large bowl using a handheld or stand mixer fitted with a paddle attachment, beat the oil, granulated sugar, brown sugar, eggs, sour cream, and vanilla together until combined. Add the zucchini and mix to incorporate. Add the dry ingredients to the batter and beat on medium speed until completely combined. Fold in the chocolate chips. Batter will be slightly thick.
  3. Pour batter evenly into cake pans. Bake for around 28–32 minutes or until the cakes are baked through. To test for doneness, lightly poke the top of the cake with your finger—if it bounces back instead of leaving , the cake is done. Or you can insert a toothpick into the center of the cake—if it comes out clean, it’s done.
  4. Set the cakes on a cooling rack and let cool in the pans for 1 hour. After 1 hour, remove the cakes from the pans, discard the parchment rounds, and let the cakes finish cooling directly on the rack. The cakes must be completely cool before frosting and assembling.
  5. Make the buttercream: With a handheld or stand mixer fitted with a paddle attachment, beat the butter on medium speed until creamy, about 2 minutes. Add confectioners’ sugar, cocoa powder, 3 Tablespoons of cream, salt, and vanilla. Beat on low speed for 30 seconds, then gradually increase to high speed and beat until it’s smooth and creamy. Do not over-whip. Add 1/4 cup more confectioners’ sugar or cocoa powder if frosting is too thin or 1–2 more Tablespoons of cream if frosting is too thick. (I usually add 1 more.) Taste. Add another pinch of salt if desired.
  6. Assemble and frost: First, using a large serrated knife, slice a thin layer off the tops of the cakes to create a flat surface. Discard (or crumble over ice cream!). Place 1 cake layer on your cake stand, cake turntable, or serving plate. Evenly cover the top with a heaping cup of frosting. Top with 2nd cake layer and spread the remaining frosting all over the top and sides. Pipe any leftover frosting on top. (I used Wilton 1M tip.) Decorate with chocolate sprinkles or chocolate chips if desired. Slice and serve.
  7. Cover leftover cake and store at room temperature for up to 2 days or in the refrigerator for up to 5 days.

Notes

  1. Make Ahead Instructions: Prepare cakes and frosting 1 day in advance. Keep cakes at room temperature, covered tightly. Refrigerate prepared frosting in an airtight container, then bring to room temperature when ready to use. Frosted or unfrosted cakes may be frozen up to 2 months, thaw overnight in the refrigerator and bring to room temperature, if desired, before serving.
  2. Special Tools (affiliate links): Box GraterGlass Mixing Bowls | Electric Mixer (Handheld or Stand) | 9-inch Round Cake Pan | Cake Turntable | Wilton 1M Piping Tip | Piping Bag (Reusable or Disposable) | Cake Carrier (for storage)
  3. Blot the Zucchini: Give the shredded zucchini a very light blotting with a towel. Don’t squeeze too much moisture out, just a little blot before adding to the wet ingredients. I own and love this box grater—works quickly!
  4. 9×13-inch Cake: Interested in making a sheet cake instead? This batter will fit into a 9×13-inch pan. The bake time is long—at least 45 minutes to ensure the thick cake is baked through. Same oven temperature.
  5. Non-Chocolate Zucchini Cake: Looking for zucchini cake without chocolate? Here is my regular zucchini cake topped with brown butter cream cheese frosting.
  6. Cupcakes: This recipe yields 24–30 cupcakes. Bake for 18–22 minutes or until a toothpick inserted in the center comes out *mostly* clean with no wet batter. Same oven temperature.

Instead of cake, try these as cupcakes! Directions in the recipe Notes above.

chocolate zucchini cupcake topped with chocolate fudge frosting
sally mckenney headshot purple shirt.
About the Author

Sally McKenney

Sally McKenney is a baker, food photographer, and New York Times best-selling author. Her kitchen-tested recipes and step-by-step tutorials have given millions of readers the knowledge and confidence to bake from scratch. Sally’s work has been featured on TODAY, Good Morning America, Taste of Home, People, and more.

Read More

Reader Comments and Reviews

  1. Kim says:
    September 26, 2024

    I love this recipe! I have made it three times already this year. I want to make it again for my friend who is dairy free. What can I replace the sour cream with?


    1. Erin @ Sally's Baking says:
      September 26, 2024

      Hi Kim, we’re so glad you love this cake! We haven’t tested a dairy free version of this cake but let us know if you try anything.

  2. Chris says:
    September 25, 2024

    I just made this cake and again the second item I’ve made from Sally’s Baking. A flop to say the very least. Followed the recipe to a T. Never again Sally.

    1. Lexi @ Sally's Baking says:
      September 25, 2024

      Hi Chris, we’re so sorry to hear that. Can you tell us a bit more about what seemed to go wrong? We’d love to help you troubleshoot.

  3. Sharon says:
    September 19, 2024

    I followed your recipe to the letter and went with cupcakes. I’ve got another zucchini left and guess what I’m making again? They’re moist and rich yet not at all heavy; not overly sweet yet satisfy that craving.

  4. YOW-Baker says:
    September 14, 2024

    The best chocolate zucchini cake recipe ever! The chocolate chips aren’t needed, if icing the cake.

    To reduce carbs somewhat, I replaced 1/2 cup of the oil with applesauce, all of the white sugar with ½ cup monk fruit sugar and a ½ cup of flour with ground almonds.

    1. Liv says:
      September 17, 2024

      I made this recipe for my daughter’s 8th birthday party and it passed the ultimate test: the kids loved it!

  5. Joy says:
    September 13, 2024

    Would recommend not using stand mixer wisk attachment; the zucchini clumped in it. Baking now. Smells delicious. I’m using a Bundt pan. Will see how it turns out

  6. sclem says:
    September 11, 2024

    this was a most excellent recipe
    I didnt squeeze out the zucchini and it turned out so moist.
    I also reduced a bit of the sugar and it was just perfect!

  7. Vivian Froese says:
    September 10, 2024

    This cake was delicious!

  8. Hope says:
    September 7, 2024

    Sally, I have not made too many cakes from scratch but I have had an abundance of zucchini from my garden. I have made this cake 4 times in over a month. Everyone loves it and gets some sent home with this very delicious cake.

    1. Michelle @ Sally's Baking says:
      September 7, 2024

      So glad you love this cake, Hope!

  9. K says:
    September 6, 2024

    Yummy cake!
    I replaced the oil with a half cup of melted unsalted butter and half a cup of apple sauce since I don’t like using vegetable/canola oil. It worked well. I’m not sure how it compares to the original recipe, but I was happy with how it turned out. I baked in a glass 9by13. I checked it at 43 minutes of baking and it was probably slightly overdone, so I would start with 40 minutes of bake time next time. I did not make frosting, it’s nice to eat on its own. Growing up we would have whipped cream on top, which I would add if I had whipping cream on hand. Great way to use up zucchini! Thanks for the recipe! 🙂

  10. Beatrice says:
    September 5, 2024

    I sub Splenda for the cup of sugar and did half white flour half whole wheat!! Turned out very good. Also did a batch of cupcakes!! All turned out good!!! Will make again!

  11. Nancy O. says:
    September 4, 2024

    Can I make this cake in a bundt pan?

    1. Lexi @ Sally's Baking says:
      September 4, 2024

      Hi Nancy, We’re unsure of the exact bake time for a Bundt cake, but it will take well over the time needed for the cake layers. Keep a close eye on it and use a toothpick to test for doneness. Hope it’s a hit!

  12. Sarah DS says:
    September 4, 2024

    This was one of the best cakes I have ever tasted. Everyone loves it. Making my third one in 2 weeks. So easy. Very moist! Normally bake it a few minutes longer than stated but its great

    1. Denise says:
      September 14, 2024

      Cake looks delicious just out of the oven, it was baked in a Bundt pan and it took about 70 minutes. Can’t wait to try it tomorrow

  13. Aly says:
    September 4, 2024

    I wanted to love this cake so much! The positives were that it was dark, moist and fudge-like. The frosting was delicious. However, I could taste and smell the zucchini. A vegetable taste that’s hard to describe and a gassy, squash odor when the cake was uncovered. Two family members said the same thing which kind of embarrassed me as I had made the cake for a get together. I think that three cups of shredded zucchini is perhaps excessive when two might suffice and the cake would still be moist.

    1. Lexi @ Sally's Baking says:
      September 4, 2024

      Hi Aly, we’re so sorry to hear that. Was your zucchini bad or past its prime by chance? Zucchini is tasteless in baked goods, but once it has started to spoil, it can take on a sour smell. If you decide to give it another try in the future, make sure your zucchini is fresh as possible before grating and adding to the batter. Thank you for giving this one a try!

  14. Heather T says:
    August 28, 2024

    Where can I find the recipe for the frosting?

    1. Erin @ Sally's Baking says:
      August 28, 2024

      Hi Heather, there is a link to the chocolate frosting at the bottom of the ingredient list on the recipe card. It’s the same chocolate buttercream recipe that we use in the Triple Chocolate Cake which is where the link takes you. Hope you enjoy the cake if you give it a try!

  15. Linda says:
    August 28, 2024

    Can thus cake be baked in a prepared bundle pan with a longer baking time ?

    1. Lexi @ Sally's Baking says:
      August 28, 2024

      Hi Linda, We’re unsure of the exact bake time for a Bundt cake, but it will take well over the time needed for the cake layers. Keep a close eye on it and use a toothpick to test for doneness. Hope it’s a hit!

  16. Aly says:
    August 27, 2024

    I’m going to make this for Labor Day weekend. One question: does it make a difference if I add the dry ingredients to the wet instead of vice a Versa? Thanks!

    1. Lexi @ Sally's Baking says:
      August 28, 2024

      Hi Aly, either will work here. Hope it’s a hit!

  17. Emily says:
    August 26, 2024

    This was amazing! Probably the best chocolate cake we’ve ever had–so moist! And no one even guessed there was zucchini in it.

  18. KarenMiller says:
    August 25, 2024

    I’m excited to try this recipe. Wondering if I could substitute pumpkin for the oil?

    1. Erin @ Sally's Baking says:
      August 25, 2024

      Hi Karen, we haven’t tested that substitution. Readers have reported success substituting applesauce for half of the oil. Let us know if you try it and how it turns out.

    2. Vivian Froese says:
      September 10, 2024

      I don’t use oil or butter in my cakes. Substitutions are mashed banana, applesauce, almond yogurt and pumpkin in any combination. I think I used banana and pumpkin this time. Turned out great!!

  19. Zsa says:
    August 25, 2024

    Can you omit the sour cream?

    1. Erin @ Sally's Baking says:
      August 25, 2024

      Hi Zsa, you can use the same amount of plain yogurt in place of the sour cream, but we don’t recommend leaving it out completely. Hope you enjoy the cake!

  20. Kara S says:
    August 21, 2024

    This wasn’t just the best zucchini recipe I’ve ever tried, it was the best cake recipe as well! The zucchini here makes this moist and fudgy, almost like a brownie, but still fluffy like cake. I used a basic cream cheese frosting and it was divine. I will be making this for birthdays in the future!

  21. Laura Ivy says:
    August 20, 2024

    I love this recipe. It is so good!!!! My neighbors have even asked me to make it for their birthdays etc.
    We get a lot of zucchini from our garden in the summer. Can you freeze the shredded zucchini and use it in future cakes? And if so, how do you do that. Thanks!!

    1. Lexi @ Sally's Baking says:
      August 20, 2024

      Hi Laura, so glad you enjoyed it! You can freeze the shredded zucchini, just be sure to thaw and drain off all the excess moisture before using in the cake.

  22. Nat says:
    August 20, 2024

    If I were to sub out the eggs what would be your go-to options?

    1. Lexi @ Sally's Baking says:
      August 20, 2024

      Hi Nat, we haven’t tested this recipe with any egg substitutes, so we’re unsure what swap might work best. Let us know if you do any experimenting.

    2. Julia says:
      September 27, 2024

      I usually replace half of the eggs in this recipe with chia eggs and have great results. I’ve never subbed out all of the eggs, but you could test it out. I suspect the flavor will be less decadent, but still tasty.

      1 Chia Egg: Mix 1 tablespoon of chia seeds with 3 tablespoons water and let sit for ~15 minutes.

      1 chia egg=1 chicken egg

  23. Cindy Jenson says:
    August 18, 2024

    This is the best chocolate cake I have ever had!

  24. Kristen W says:
    August 18, 2024

    Could you sub butter for the oil in this recipe?

    1. Sally @ Sally's Baking says:
      August 18, 2024

      Hi Kristen, butter won’t work as nicely in this recipe. You don’t want to cream it, and melted butter won’t produce a nice moist crumb like this.

  25. Sunny says:
    August 17, 2024

    Hi, I wanted to ask whether substituting all-purpose flour with whole wheat flour would work.
    Thanks!

    1. Michelle @ Sally's Baking says:
      August 17, 2024

      Hi Sunny, we haven’t tried that substitute here, but let us know how it turns out if you do!

      1. Sunny says:
        August 17, 2024

        Thank you! Also, I love how fast the feedback is!! 🙂

  26. Evie T says:
    August 16, 2024

    This cake turned out excellent! I substituted 0% fat greek yogurt for the sour cream and it worked beautifully. Thanks for the wonderful recipe

    1. Kris M says:
      September 1, 2024

      Hi Sally and team! Can you substitute applesauce for ALL the oil or you recommend only up to half?? Thank you!

      1. Michelle @ Sally's Baking says:
        September 1, 2024

        Hi Kris, we haven’t tested either way, but many readers have commented that they’ve had great success with substituting applesauce for half the oil.

  27. Katie says:
    August 16, 2024

    Is there a way I can add 1 cup of espresso to the cake like the other wonderful chocolate cake you have or use that recipe and add zucchini! Would love your thoughts!

    1. Lexi @ Sally's Baking says:
      August 16, 2024

      Hi Katie, adding liquid espresso to this cake would take some recipe testing, since it would throw off the wet to dry ingredient ratios. The cake is already wonderfully moist with all that zucchini!

      1. Sunny says:
        August 18, 2024

        If espresso powder is used instead, would it work?

      2. Michelle @ Sally's Baking says:
        August 18, 2024

        Hi Sunny, yes! We use 1 teaspoon of espresso powder here, but it is optional!

      3. Nicole says:
        September 9, 2024

        Can I freeze the baked cake?

      4. Lexi @ Sally's Baking says:
        September 10, 2024

        Hi Nicole, absolutely. See recipe notes for details on how to freeze this cake.

  28. Elle Meloche says:
    August 14, 2024

    This is a wonderful recipe. The cake is buttery smooth and moist and full of chocolate flavour. It is not overly sweet. I did not make the frosting. I baked it in a bundt pan (which required more baking time). I will make this again.

  29. Suzanne Herrington says:
    August 14, 2024

    Hi Sally. I’m a baker for many years. This cake was FANTASTIC! I took it to work to share with co-workers. Everyone loved it and one even said it was the best chocolate cake they ever had! Thank you for the recipe and sweet wat to use up some of that zucchini that’s so abundant this time of year!

  30. Kathy McCormick says:
    August 10, 2024

    I’ve been given three fairly large YELLOW squash. The ‘giver’ says they are zucchini. Have you seen these and would they work the same for this cake? Thanks

    1. Beth @ Sally's Baking says:
      August 10, 2024

      Hi Kathy, yellow squash is fine to sub for zucchini here, but if the squash get really big it will likely have seeds in it, and you don’t want to use that part. Hope this helps!

      1. Sandy Heckman says:
        August 31, 2024

        I made this exactly as the recipe. It was delicious! I used your chocolate buttercream icing on it. It was also delicious! Thanks for a great recipe!