This carrot cake recipe with pineapple makes one moist, tender 9 x 13-inch cake or two 9-inch round cakes. Made with freshly grated carrots, well-drained crushed pineapple, warm cinnamon, and a neutral oil-based batter, it bakes in 35–45 minutes and is finished with a rich cream-cheese frosting.
Each bite is softly spiced, pleasantly fruity, and richly moist without being heavy. Optional pecans or walnuts add crunch, while coconut or raisins bring extra texture to this classic fruit-filled dessert.
Jump to RecipeWhy You’ll Love This Recipe
This pineapple carrot cake has the cozy character of a traditional carrot cake with a bright, juicy note from crushed pineapple. The fruit melts into the crumb as it bakes, helping create a cake that stays soft and moist while adding gentle sweetness.
Using oil instead of butter gives the cake a supple texture that lasts well after baking. Oil remains liquid when cool, so slices stay tender whether they are served the same day or enjoyed from the refrigerator later.
The cream-cheese frosting supplies a cool, tangy contrast to the warmly spiced cake. Cinnamon leads the flavor, while a little nutmeg adds depth without taking attention away from the carrots and pineapple.
- Simple preparation: The batter comes together in bowls with a whisk and spatula.
- Flexible texture: Pecans, walnuts, coconut, and raisins are all optional.
- Party-friendly format: One 9 x 13-inch cake provides easy squares for sharing.
- Layer-cake option: The same batter can be baked in two 9-inch round pans.
Ingredients You’ll Need

All-purpose flour forms the structure, while baking soda helps the cake rise. Salt sharpens the sweetness, and cinnamon with optional nutmeg creates the familiar bakery-style spice profile.
The wet ingredients are straightforward: granulated sugar, neutral vegetable oil, four room-temperature eggs, and vanilla extract. Bringing the eggs to room temperature helps them blend smoothly with the oil and sugar instead of leaving a thin, uneven batter.
For the signature fruit component, use one 8-ounce can of crushed pineapple and drain it very well. Pineapple packed in juice works beautifully, but excess liquid should not go into the batter because it can make the center gummy.
Freshly grated carrots are worth the small amount of extra preparation. Packaged shredded carrots are often thicker and drier, while fine fresh shreds soften into the cake and distribute their natural moisture more evenly.
The frosting needs softened cream cheese, softened unsalted butter, sifted confectioners’ sugar, vanilla, and optional salt. Sifting the sugar helps produce a smoother spread with fewer lumps.
Optional additions let you shape the cake around your taste. Fold in 1/2 cup of chopped pecans or walnuts for crunch, or use 1/2 cup of sweetened shredded coconut or raisins for a chewy contrast.
How to Make It Step-by-Step

Step 1: Heat the oven to 350°F (175°C), then grease a 9 x 13-inch pan and line the bottom with parchment if desired. If you prefer round layers, prepare two 9-inch round pans in the same way so the cakes release neatly after cooling.
Step 2: Whisk the flour, baking soda, salt, cinnamon, and optional nutmeg in a medium bowl. Take a moment to break up any pockets of flour or spice, since an even dry mixture gives every slice consistent flavor and lift.
Step 3: In a separate large bowl, whisk the sugar, oil, room-temperature eggs, and vanilla until smooth. The mixture does not need to be beaten until fluffy; a glossy, evenly blended mixture is exactly what this oil-based cake needs.
Step 4: Add the dry ingredients to the wet ingredients and stir just until combined. Stop as soon as no dry streaks remain, because overmixing can develop the flour and make the crumb less tender.
Step 5: Fold in the finely grated carrots and thoroughly drained crushed pineapple. Add the optional nuts, coconut, or raisins at this stage, using a spatula and gentle strokes to keep the batter light.
Step 6: Spread the batter evenly in the prepared 9 x 13-inch pan. An even layer helps the center and edges finish baking at the same time, so smooth the surface before placing the pan in the oven.
Step 7: Bake for 35–45 minutes for a 9 x 13-inch cake, or 30–35 minutes for two 9-inch rounds. The cake is ready when the center is set and a toothpick comes out clean or with a few moist crumbs, rather than wet batter.
Step 8: Let the cake cool completely before frosting, allowing at least 1 hour. Frosting a warm cake can cause the cream cheese mixture to soften and slide, so patience gives you a cleaner finish.
Step 9: Beat the softened cream cheese and butter until smooth, then gradually add the sifted confectioners’ sugar. Beat in the vanilla and optional salt, scraping the bowl as needed until the frosting is creamy and spreadable.
Step 10: Spread the frosting over the cooled cake in an even layer. If you baked round cakes, frost between the layers and over the top and sides, then refrigerate the finished cake if it will not be served within a few hours.
Pro Tips for the Best Texture

Drain the pineapple over a bowl or fine-mesh strainer and press gently to remove excess juice. Thorough draining is one of the most important details in this recipe because the cake already receives plenty of moisture from the oil, carrots, eggs, and fruit.
Grate the carrots finely with a box grater or food processor grating disk. Fine shreds blend into the crumb, while very thick pieces can remain firm and create uneven pockets in the finished cake.
Measure flour carefully by spooning it into a measuring cup and leveling the top, or use the listed 250-gram weight. Too much flour can make the cake dense and reduce the soft texture that makes carrot cake so appealing.
Mix the batter only until the flour disappears. A few gentle folds are enough to distribute the carrots and pineapple without making the cake tough.
For a more pronounced pineapple flavor, reserve 1–2 tablespoons of the drained pineapple juice and add it to the frosting. Do not add undrained pineapple or extra juice to the batter, since the added liquid can interfere with the cake’s texture.
For a neat frosting finish, use an offset spatula and make shallow swirls across the top. A scattering of finely chopped pecans, walnuts, carrot curls, or a light dusting of cinnamon makes the cake look inviting without changing the main recipe.
Serving, Storage & Make-Ahead Advice

Serve this cake chilled, cool, or close to room temperature. Chilling firms the frosting and makes clean squares, while a short rest at room temperature softens the frosting and lets the spice and pineapple flavors come through more fully.
Because the frosting contains cream cheese, refrigerate the cake if it will not be served within a few hours. Cover the pan or place slices in an airtight container to protect the moist crumb from refrigerator odors.
The unfrosted cake can be prepared ahead and cooled completely before being covered tightly. Frost it later when convenient, or frost the cooled cake and refrigerate it until serving.
- For gatherings: Bake in the 9 x 13-inch pan and cut into squares for easy serving.
- For layers: Use two 9-inch round pans and bake for 30–35 minutes.
- For nut-free guests: Leave out the pecans or walnuts without changing the other quantities.
- For a fruit-focused finish: Add pineapple juice to the frosting and decorate with a few drained pineapple pieces just before serving.
Flavor Variations and Pairing Ideas

Walnuts provide a slightly earthy crunch, while pecans bring a sweeter, buttery note. Toasted nuts can be used if you enjoy a deeper flavor, but chopped nuts can also be folded in as listed without any extra preparation.
Coconut gives the cake a softly chewy texture and a tropical touch that pairs naturally with pineapple. Raisins are another classic choice, adding little bursts of concentrated sweetness throughout the tender crumb.
For a simple dessert plate, serve a square with coffee, black tea, or cold milk. The creamy frosting also pairs well with fresh fruit, especially when the cake is part of a brunch or afternoon dessert spread.

Carrot Cake with Pineapple
Ingredients
Method
- Heat the oven to 350°F (175°C). Grease a 9 x 13-inch pan and line the bottom with parchment if desired; for two 9-inch rounds, grease and line both pans.
- Whisk the flour, baking soda, salt, cinnamon, and optional nutmeg together in a medium bowl. This distributes the leavening and spices evenly before they reach the wet ingredients.
- In a separate large bowl, whisk the sugar, oil, room-temperature eggs, and vanilla until smooth. Stir the dry ingredients into the wet mixture just until no dry streaks remain.
- Fold in the finely grated carrots, thoroughly drained crushed pineapple, and any optional nuts, coconut, or raisins. Keep the mixing gentle so the finished cake stays tender.
- Spread the batter evenly in the prepared pan or divide it between the two round pans. Bake a 9 x 13-inch cake for 35–45 minutes, or bake two 9-inch rounds for 30–35 minutes.
- Check the center with a toothpick; it should come out clean or with a few moist crumbs. Cool the cake completely, for at least 1 hour, before adding frosting.
- Beat the softened cream cheese and butter until smooth. Add the sifted confectioners’ sugar gradually, then beat in the vanilla and optional salt until creamy.
- Spread the frosting over the completely cooled cake. If the cake will not be served within a few hours, refrigerate it and bring it out shortly before serving.
Notes
Final Thoughts
This carrot cake recipe with pineapple is a reliable, generously moist dessert built from familiar ingredients. Fresh carrots, well-drained pineapple, warm spices, and oil create a tender cake, while tangy cream-cheese frosting brings the finishing balance.
Keep the optional additions tailored to your table, or make the basic cake exactly as written for a soft fruit-filled crumb. Once completely cooled and frosted, it is ready for birthdays, holidays, brunches, or any afternoon when a generously frosted slice sounds just right.





