Summer gardens always leave me with more zucchini than I know what to do with. I’ve made zucchini bread, zucchini fritters, and grilled zucchini until my family begs for something different. That’s when I started turning my extra zucchini into cake instead.
This zucchini cake is like carrot cake’s cousin. It’s moist, spiced just right, and you’d never guess there are vegetables hiding inside. The crushed pineapple adds extra moisture without making things soggy. And that cream cheese frosting? It’s the same one I use on my carrot cake because why mess with a good thing.
The best part is you can make this cake year-round. Got zucchini from the garden? Perfect. Only have store-bought? Works just as well. You can even grate and freeze your summer zucchini to use in this cake come fall.
Why You’ll Love This Zucchini Cake
- Sneaky way to use up zucchini – This cake is perfect for using those extra zucchinis from your garden or the farmers market, and nobody will even know there’s a vegetable hiding in there.
- Moist and flavorful – The combination of zucchini, pineapple, and sour cream keeps this cake incredibly tender, while the warm spices give it that cozy flavor everyone loves.
- Simple ingredients – You probably already have most of these pantry staples at home, making it easy to whip up whenever a craving hits.
- Quick to make – This cake comes together in under an hour, so it’s perfect for last-minute gatherings or when you need a homemade dessert without spending all day in the kitchen.
- Crowd-pleasing dessert – The creamy frosting and hint of pineapple make this cake a hit at potlucks, family dinners, or any time you want to treat yourself to something sweet.
What Kind of Zucchini Should I Use?
Any type of zucchini will work great in this cake, whether you have dark green, light green, or even yellow summer squash on hand. Medium-sized zucchini (about 6-8 inches long) tend to be the best choice since they’re tender and have fewer seeds than the giant ones you might find at the end of summer. There’s no need to peel your zucchini before grating – the skin is thin and will blend right into the cake, plus it adds a bit of extra nutrition. After grating, you don’t need to squeeze out the moisture like you would for some recipes, as that liquid actually helps keep the cake nice and moist.
Options for Substitutions
This cake is pretty forgiving when it comes to swapping ingredients:
- Oil: You can use vegetable oil, canola oil, melted coconut oil, or even melted butter interchangeably. Each will work just fine, though butter will give you a slightly richer flavor.
- Crushed pineapple: If you don’t have pineapple, try using unsweetened applesauce instead. It keeps the cake moist and adds a subtle sweetness. Use the same amount and drain any excess liquid.
- Sour cream: Plain Greek yogurt works perfectly as a substitute and adds the same tangy moisture to the cake. You can also use regular plain yogurt if that’s what you have.
- Zucchini: Yellow squash makes a great swap for zucchini and works exactly the same way. Just grate it the same size and squeeze out excess moisture before adding to the batter.
- Spices: Don’t have all three spices? You can use 2 1/2 teaspoons of pumpkin pie spice or apple pie spice instead of the cinnamon, nutmeg, and ginger combination.
- Cream cheese frosting: If you want a lighter option, try a simple powdered sugar glaze made with powdered sugar and milk, or even skip the frosting and dust with powdered sugar instead.
Watch Out for These Mistakes While Baking
The biggest mistake when making zucchini cake is forgetting to squeeze out the excess moisture from your grated zucchini, which can lead to a dense, wet cake that takes forever to bake through – simply wrap the zucchini in a clean kitchen towel and give it a good squeeze over the sink.
Another common error is frosting the cake while it’s still warm, causing the cream cheese frosting to melt and slide right off, so make sure your cake is completely cool to the touch before you even think about frosting it.
Don’t skip draining your crushed pineapple either, as that extra liquid can also make your cake too moist and prevent it from setting properly.
Finally, when mixing your batter, stop as soon as the flour is just incorporated – overmixing develops the gluten and turns your tender cake into a tough, rubbery disappointment.
What to Serve With Zucchini Cake?
This zucchini cake is pretty much perfect on its own with that cream cheese frosting, but I love serving it with a hot cup of coffee or tea for an afternoon treat. If you’re making it for a gathering, set out some fresh berries on the side – strawberries or raspberries add a nice pop of freshness that balances the sweetness of the cake. For a more indulgent dessert, a scoop of vanilla ice cream alongside a warm slice is really good, especially if you heat the cake for just a few seconds in the microwave. You could also serve it with some whipped cream and a light dusting of extra cinnamon on top for a simple finishing touch.
Storage Instructions
Store: This cake stays moist for days thanks to all that zucchini! Keep it covered in the fridge for up to 5 days. I actually think it tastes even better the next day once all the flavors have had time to meld together.
Freeze: You can freeze this cake with or without the frosting for up to 3 months. If you’re freezing it frosted, pop it in the freezer uncovered for about an hour until the frosting firms up, then wrap it well in plastic wrap and foil. For unfrosted cake, just wrap individual slices in plastic wrap so you can grab one whenever you need it.
Serve: Let frozen slices thaw in the fridge overnight or at room temperature for a couple hours. The cream cheese frosting stays nice and creamy, so there’s no need to do anything special before serving.
| Preparation Time | 20-25 minutes |
| Cooking Time | 30-35 minutes |
| Total Time | 50-60 minutes |
| Level of Difficulty | Easy |
| Servings | 14 slices |
Estimated Nutrition
Estimated nutrition for the whole recipe (without optional ingredients):
- Calories: 3500-3750
- Protein: 35-40 g
- Fat: 170-185 g
- Carbohydrates: 460-490 g
Ingredients
For the cake:
- 1/2 cup vegetable oil
- 3/4 cup granulated sugar
- 3/4 cup brown sugar, packed
- 1/2 cup crushed pineapple, drained well
- 2 large eggs
- 2 1/2 tsp vanilla extract
- 1/3 cup full-fat sour cream
- 2 cups zucchini, finely grated and squeezed dry
- 2 cups all-purpose flour
- 2 tsp baking powder
- 1/2 tsp baking soda
- 3/4 tsp salt
- 2 1/2 tsp ground cinnamon
- 1/2 tsp ground nutmeg
- 1/4 tsp ground ginger
- 1/8 tsp ground cloves
For the frosting:
- 8 oz cream cheese, softened
- 8 tbsp unsalted butter, softened
- 2 1/2 cups powdered sugar, sifted
- 1 1/2 tsp vanilla extract
- 1 tbsp cinnamon sugar for topping
Step 1: Prepare Pan and Mix Dry Ingredients
- 2 cups all-purpose flour
- 2 tsp baking powder
- 1/2 tsp baking soda
- 3/4 tsp salt
- 2 1/2 tsp ground cinnamon
- 1/2 tsp ground nutmeg
- 1/4 tsp ground ginger
- 1/8 tsp ground cloves
Preheat your oven to 350°F and grease a 9×13 inch baking pan (or similar size).
While the oven heats, whisk together the flour, baking powder, baking soda, salt, cinnamon, nutmeg, ginger, and cloves in a medium bowl.
Set this dry mixture aside—having it ready before you mix the wet ingredients ensures the batter doesn’t sit too long and lose its leavening power.
Step 2: Build the Wet Ingredient Base
- 1/2 cup vegetable oil
- 3/4 cup granulated sugar
- 3/4 cup brown sugar, packed
- 2 large eggs
- 2 1/2 tsp vanilla extract
- 1/3 cup full-fat sour cream
- 2 cups zucchini, finely grated and squeezed dry
- 1/2 cup crushed pineapple, drained well
In a large mixing bowl, whisk together the vegetable oil, granulated sugar, and brown sugar until combined and slightly lightened.
Add the eggs one at a time, whisking well after each addition to incorporate air and create a lighter crumb.
Stir in the vanilla extract and sour cream until smooth.
Finally, fold in the grated zucchini and drained pineapple—the moisture from these ingredients adds tenderness and flavor to the cake.
Step 3: Combine and Bake the Cake
- dry ingredient mixture from Step 1
- wet ingredient mixture from Step 2
Gently fold the dry ingredient mixture from Step 1 into the wet mixture from Step 2 until just combined—don’t overmix, as this can lead to a dense cake.
Pour the batter into your prepared pan and smooth the top.
Bake for 30-35 minutes, until a toothpick inserted in the center comes out clean or with just a few moist crumbs.
I like to bake cakes like this in the lower third of the oven to ensure even cooking without the edges browning too quickly.
Remove from the oven and let cool completely on a wire rack before frosting.
Step 4: Make the Cream Cheese Frosting
- 8 oz cream cheese, softened
- 8 tbsp unsalted butter, softened
- 2 1/2 cups powdered sugar, sifted
- 1 1/2 tsp vanilla extract
While the cake cools, beat the softened cream cheese and unsalted butter together in a medium bowl using an electric mixer on medium speed for 2-3 minutes, until the mixture is light and fluffy.
This step is crucial because whipping air into the frosting creates a smoother, creamier texture.
Add the sifted powdered sugar and vanilla extract, then beat on medium speed for another 3-4 minutes until the frosting is pale, fluffy, and free of lumps.
I find that sifting the powdered sugar beforehand prevents any grainy texture in the final frosting.
Step 5: Frost and Finish the Cake
- baked cake from Step 3
- cream cheese frosting from Step 4
- 1 tbsp cinnamon sugar for topping
Once the cake from Step 3 has cooled completely, spread the frosting from Step 4 evenly over the top using an offset spatula or the back of a spoon.
Sprinkle the cinnamon sugar topping over the frosting, distributing it evenly across the surface for a nice finish.

Pineapple Zucchini Cake with Cream Cheese Frosting
Ingredients
Method
- Preheat your oven to 350°F and grease a 9x13 inch baking pan (or similar size). While the oven heats, whisk together the flour, baking powder, baking soda, salt, cinnamon, nutmeg, ginger, and cloves in a medium bowl. Set this dry mixture aside—having it ready before you mix the wet ingredients ensures the batter doesn't sit too long and lose its leavening power.
- In a large mixing bowl, whisk together the vegetable oil, granulated sugar, and brown sugar until combined and slightly lightened. Add the eggs one at a time, whisking well after each addition to incorporate air and create a lighter crumb. Stir in the vanilla extract and sour cream until smooth. Finally, fold in the grated zucchini and drained pineapple—the moisture from these ingredients adds tenderness and flavor to the cake.
- Gently fold the dry ingredient mixture from Step 1 into the wet mixture from Step 2 until just combined—don't overmix, as this can lead to a dense cake. Pour the batter into your prepared pan and smooth the top. Bake for 30-35 minutes, until a toothpick inserted in the center comes out clean or with just a few moist crumbs. I like to bake cakes like this in the lower third of the oven to ensure even cooking without the edges browning too quickly. Remove from the oven and let cool completely on a wire rack before frosting.
- While the cake cools, beat the softened cream cheese and unsalted butter together in a medium bowl using an electric mixer on medium speed for 2-3 minutes, until the mixture is light and fluffy. This step is crucial because whipping air into the frosting creates a smoother, creamier texture. Add the sifted powdered sugar and vanilla extract, then beat on medium speed for another 3-4 minutes until the frosting is pale, fluffy, and free of lumps. I find that sifting the powdered sugar beforehand prevents any grainy texture in the final frosting.
- Once the cake from Step 3 has cooled completely, spread the frosting from Step 4 evenly over the top using an offset spatula or the back of a spoon. Sprinkle the cinnamon sugar topping over the frosting, distributing it evenly across the surface for a nice finish.

