Would you eat a slice of cake if I told you it had two whole cups of vegetables baked right in?
Because that’s exactly what’s happening here, and nobody at my table has ever guessed it. Not once.
I grew way too much zucchini in my garden this summer. Like, embarrassingly too much. I gave some to my neighbors, froze a bunch, and then finally got tired of sautéing it every night for dinner.
So I turned to dessert instead.
This zucchini cake is soft, spiced, and topped with a cream cheese frosting that ties the whole thing together. It tastes like a cousin of carrot cake, but somehow even more tender.
Side Note: If your only experience with zucchini is a sad side dish from childhood, this recipe is about to change that completely.
Why This Cake Works
Grated zucchini doesn’t add much flavor on its own. What it does add is moisture, and a lot of it.
That’s the secret behind why this cake stays soft for days instead of drying out by day two like most homemade cakes do.
The warm spices (cinnamon and nutmeg) give it that cozy, almost fall-ish flavor. And the cream cheese frosting balances the sweetness with a little tang, so it never feels heavy.
I’ve made plain vegetable-free spice cakes before, and they always dry out faster than this one does. The zucchini is basically doing double duty, adding texture and keeping every slice tender days later.
It also means you can get away with using a little less oil than a typical cake recipe calls for. The vegetable picks up the slack, so nothing here tastes greasy or overly rich.
What You’ll Need
Here’s everything for the cake and the frosting. Nothing fancy, just pantry basics and one vegetable you probably have too much of right now.
| For the Cake | Amount |
|---|---|
| All-purpose flour | 2 cups |
| Baking powder | 1½ tsp |
| Baking soda | 1 tsp |
| Ground cinnamon | 1 tsp |
| Ground nutmeg | ½ tsp |
| Salt | ½ tsp |
| Vegetable oil | ¾ cup |
| Granulated sugar | 1 cup |
| Brown sugar, packed | ½ cup |
| Large eggs | 3 |
| Vanilla extract | 1 tsp |
| Grated zucchini (about 2 medium) | 2 cups |
| Chopped walnuts or pecans (optional) | ½ cup |
| For the Frosting (Optional) | Amount |
|---|---|
| Cream cheese, softened | 4 oz |
| Unsalted butter, softened | ¼ cup |
| Powdered sugar | 1½ cups |
| Vanilla extract | 1 tsp |
| Salt | pinch |

Tools You’ll Need
- 9×13-inch baking pan
- Box grater
- Two large mixing bowls
- Whisk
- Electric hand mixer (for the frosting)
- Rubber spatula
- Wire cooling rack
- Toothpick
How to Make Zucchini Cake
Make the Batter
- Preheat your oven to 350°F (175°C). Grease your 9×13 pan, or line it with parchment paper.
- In one bowl, whisk together the flour, baking powder, baking soda, cinnamon, nutmeg, and salt. Set it aside.
- In your second bowl, whisk the oil, granulated sugar, brown sugar, eggs, and vanilla until smooth.
- Add the dry mix into the wet mix. Stir until just combined, not perfectly smooth.
- Fold in the grated zucchini and nuts, if you’re using them. Don’t overmix here.
Bake and Cool
- Pour the batter into your prepared pan and smooth the top.
- Bake for 35 to 40 minutes. It’s done when a toothpick comes out clean.
- Let the cake cool completely in the pan on a wire rack before frosting.
This part matters more than people think. A warm cake will melt your frosting into a soupy mess in seconds.
Make the Frosting
- Beat the softened cream cheese and butter together until smooth and fluffy.
- Add the powdered sugar, vanilla, and salt. Beat again until fully combined.
- Spread it over the cooled cake, then slice and serve.
Pro Tips
- Squeeze your zucchini. Grate it, then wring it out in a clean kitchen towel or paper towels. Skip this step and your cake turns gummy instead of fluffy.
- Don’t peel the zucchini. The skin softens completely while baking and you won’t taste it. Peeling just means extra work for nothing.
- Measure your flour correctly. Spoon it into the measuring cup and level it off. Scooping straight from the bag packs in too much flour and dries out the cake.
- Let the cake fully cool before frosting. I know it’s tempting to rush this. Give it at least an hour.
- Toast your nuts first if you’re adding them. A few minutes in a dry pan brings out way more flavor than raw nuts ever will.
Substitutions and Variations
- Oil swap: Melted coconut oil or unsweetened applesauce work in place of vegetable oil, though applesauce will make the cake slightly less rich.
- Gluten-free: A 1:1 gluten-free flour blend works well here. Just don’t substitute almond flour on its own, it won’t rise the same way.
- Dairy-free frosting: Use vegan cream cheese and plant-based butter. The texture stays nearly identical.
- Add-ins: Try mini chocolate chips, shredded coconut, or a handful of raisins along with (or instead of) the nuts.
- Loaf pan version: Split the batter between two loaf pans instead of one 9×13 pan. Baking time drops to about 45 minutes.
- Cupcakes: This batter makes about 24 cupcakes. Bake at 350°F for 18 to 20 minutes.
Make Ahead Tips
The unfrosted cake can be baked a day in advance. Wrap it tightly and leave it at room temperature.
You can also make the frosting a day ahead. Keep it covered in the fridge, then let it sit out for 20 minutes before spreading so it’s easier to work with.
Nutrition Breakdown (Per Serving, Approximate)
| Calories | Protein | Carbs | Fat |
|---|---|---|---|
| 320 | 4g | 42g | 16g |
This estimate is based on 12 servings with frosting included and will shift depending on the exact brands you use. If you’re tracking macros closely, plug your specific ingredients into a nutrition calculator for an accurate number.
Diet-Friendly Swaps
- Lower sugar: Cut the granulated sugar to ¾ cup. You’ll lose a little sweetness but not much texture.
- Nut-free: Simply leave out the walnuts or pecans. The cake holds together fine without them.
Meal Pairing Ideas
This cake pairs well with a strong cup of coffee or chai in the afternoon. For dessert after dinner, try it with a small scoop of vanilla ice cream on the side.
If you’re serving it at a brunch, set it out alongside fresh fruit and a pitcher of iced tea. The spices in the cake work surprisingly well next to something bright and citrusy.
Cooking Time Efficiency Tips
Grate your zucchini the night before and store it in the fridge in a covered bowl. That way you’re not standing at the grater when you actually want to start baking.
You can also mix your dry ingredients ahead of time and keep them in a sealed container on the counter. When it’s time to bake, you’ll only need to deal with the wet ingredients and combine everything.
Storage and Leftovers
Store the frosted cake covered in the fridge for up to 5 days, since cream cheese frosting needs to stay chilled.
Let slices sit at room temperature for 15 to 20 minutes before eating so the cake softens back up.
For longer storage, wrap unfrosted cake tightly in plastic wrap, then foil, and freeze for up to 3 months. Thaw overnight in the fridge before frosting and serving.
FAQ
Do I need to peel the zucchini first?
No. The skin blends right into the batter and adds a bit of color, but no noticeable texture or taste.
Can I skip the frosting?
Yes. The cake is plenty sweet and moist on its own, and a light dusting of powdered sugar works great as a simpler topping.
Why is my cake dense instead of fluffy?
This usually means the zucchini wasn’t squeezed dry enough, or the batter got overmixed. Both trap too much extra moisture and weight in the crumb.
Can I use yellow squash instead of zucchini?
Yes, they’re nearly interchangeable in this recipe. Yellow squash has a slightly milder flavor but works the same way structurally.
How long does this cake actually stay fresh?
Thanks to all that zucchini, it stays moist for 4 to 5 days in the fridge, longer than most cakes without any vegetables in them.
Can I make this into muffins instead?
Yes. Divide the batter into a lined muffin tin and bake at 350°F for about 20 minutes, checking with a toothpick around the 18-minute mark.
My batter looks watery. Did I do something wrong?
Probably not, it just means your zucchini wasn’t wrung out enough before mixing. Squeeze out as much liquid as you can next time, and the batter should come together much thicker.
Wrapping Up
This zucchini cake turned my garden surplus into something everyone at my table actually fights over.
It’s soft, spiced just right, and that cream cheese frosting on top makes it feel like a real dessert instead of a way to sneak in vegetables.
Give it a try this week while zucchini is everywhere at the store or overflowing in your own backyard.
Then come back and let me know how it turned out in the comments below. I’d love to hear if you added nuts, tried a swap, or made it your own in some way.