If you're looking for the BEST carrot cake recipe, you've found it! This ultra-moist and perfectly spiced carrot cake has pineapple, toasted coconut, walnuts, and raisins and is enveloped in luscious cream cheese frosting. Embellish with these beautiful pineapple chips to really impress!

This Carrot Cake happens to be my all-time favorite cake. But since I don't have anyone to make it for me for my birthday, I wait for Scott's birthday (which is 12 days after mine) and make it for him. Luckily, it's his favorite cake too, so it works!
Jump to:
🧐Why This Recipe Works
So what makes this Carrot Cake with Pineapple recipe so special? Easy, it's the crushed pineapple! The pineapple not only enhances the flavor but also makes the carrot cake sweeter and moister.
But that's not all. It's also loaded with toasted shredded coconut, both in the batter and on top of the cake. Pineapple and coconut go together so well, I couldn't resist!
The spice blend in this recipe is perfectly on point too. Not overly spiced, but not too bland either. Finally, raisins, nuts, and cream cheese frosting complete this extra-special cake.
🛒What Goes Into This Recipe
Cream Cheese Frosting Ingredients
🔖Ingredient Notes & Substitutions
- Crushed Pineapple — Crushed pineapple helps to make this delicious carrot cake even moister. Make sure to include some of the liquid in the can for added flavor.
- Shredded Coconut — Toasting the coconut before adding it to the mix is highly recommended. This added step really intensifies the flavor of the coconut.
- Apple Sauce — Apple sauce is added to replace some of the oil in the recipe. If you decide to leave it out, make sure you replace it with the same amount of oil.
- Oil: Feel free to use vegetable oil, canola oil, or melted coconut oil.
- Walnuts — Again, toasting the walnuts brings out their flavor, so make sure to include this step. Pecans can be substituted.
- Spices — I like to keep the spices simple and just add cinnamon. If you'd like, you can also add a small amount of nutmeg and or ground cloves.
- Limoncello — If you don't have limoncello, you can use 1 teaspoon vanilla extract or lemon extract.
🍰How To Make Carrot Cake with Pineapple
Preheat oven to 350-degrees F.
STEP 1: Toast walnuts for approximately 8 minutes. Toast the shredded coconut on a separate tray for the last 4 minutes.
STEP 2: Allow the nuts to cool off first, then let your pent-up frustrations out by placing them in a Ziploc bag and pounding them using a rolling pin. Or you can be more civilized and use a food processor.
STEP 3: Whisk the all-purpose flour, baking powder, baking soda, ground cinnamon, and salt in a large mixing bowl. Stir in chopped walnuts and raisins. Set the dry ingredients aside.
STEP 4: Next, add vegetable oil, apple sauce, sugars, and vanilla extract to the bowl of a stand mixer. Mix the wet ingredients until thoroughly combined. Beat in eggs, then stir in grated carrots, pineapple chunks, and ½ of the toasted coconut.
STEP 5: Add the dry ingredients (in batches) until the ingredients are incorporated.
STEP 6: To make a 2 layer cake, divide the cake batter between two 9-inch or 9-½" round cake pans lined with parchment paper. (see tip below on how to cut the parchment paper).
STEP 7: Bake the cakes for 30 minutes, or until a toothpick inserted in the middle comes out clean.
STEP 8: Cool the cakes for 10 minutes then invert them onto a wire rack. Slowly peel off the parchment paper. Allow them to come to room temperature before frosting.
I recommend these pans and this wire rack. Or if you prefer, you can use a regular wire rack.
STEP 9: If baking the carrot cake in a 9" x13" pan, leave the cake in the pan until completely cooled before frosting the top.
Prepare Cream Cheese Frosting
STEP 1: Beat the softened cream cheese and butter until combined.
STEP 2: Add lemon extract or limoncello, and strained crushed pineapple and continue to mix.
STEP 3: Finally, add powdered sugar in batches, until fluffy.
How to Frost the Cake
STEP 1: Spread frosting between, on top, and on the sides of the cooled round cakes. I like to sprinkle some of the coconut flakes in between the two layers as well. Using a revolving cake stand is very helpful!
STEP 2: Sprinkle the frosted cake with the remaining toasted coconut.
🤷🏻♀️Recipe FAQs
Cover any leftovers carrot cake with plastic wrap and store in the refrigerator for up to a week. You can also store the carrot cake leftovers in the freezer in an air-tight container for up to 3 months.
Carrot cake is even better when pineapple is added to the batter. Crushed pineapple adds even more flavor and moisture and gives you a wonderful texture.
When baking a carrot cake, the raisins and nuts are optional. Only add them if you and the people you will be serving like them.
You can either purchase crushed pineapple in a can or make it yourself by adding fresh cubed pineapple to a blender or food processor and giving it a few whirls. Strain the liquid from the pineapple before using it.
👩🏼🍳Pro Tips
- Carrot cake is pretty high in calories. To cut down on some of the calories, you can use unsweetened applesauce to replace some of the oil with equal parts of applesauce. Another idea is to use unsweetened shredded coconut and low-fat cream cheese.
- You can use this recipe to make carrot cake cupcakes instead. Simply pour the cake batter into greased or lined cupcake pan and bake for approximately 30 minutes.
- To save on time, you can skip toasting the walnuts and coconut, but I think it's worth the extra 10 minutes.
- Mixing in the raisins and walnuts with the flour first coats them with flour which keeps them from sinking to the bottom of the cake.
- I like to use a measuring cup to divide the batter between the two pans so that it's equally divided.
- An easy way to fit the parchment paper in the round pans is to trace the bottom of the pans onto the parchment paper. Next, fold the parchment paper in half and cut around the drawn lines to make a half-circle. Now you have a perfectly sized piece of parchment paper to go on the bottom of the round pans.
🥮Related Recipes
Love this recipe? Please leave a 5-star 🌟🌟🌟🌟🌟rating in the recipe card below & a review in the comments section further down the page.
Stay in touch with me through social media @ Instagram, Pinterest, TikTok, and Facebook. Don't forget to tag me when you try one of my recipes!
📖 Recipe
Carrot Cake with pineapple and toasted coconut
Equipment
- 2 9½″ round cake pans
Ingredients
- 1 cup toasted walnuts (chopped)
- 2 cup all-purpose flour
- 2 teaspoon baking powder
- 1 teaspoon baking soda
- 2 teaspoon cinnamon powder
- 1 teaspoon salt
- ½ cup raisins
- 1 cup vegetable oil
- 1 4 oz apple sauce (unsweetened)
- 1 cup brown sugar
- ½ cup white sugar
- 2 teaspoon vanilla extract
- 4 large eggs
- 2 cups shredded carrots
- 1 cup crushed pineapple (with liquid)
- 1 cup unsweetened shredded coconut (divided)
Cream Cheese Frosting
- 1 8 oz cream cheese (softened)
- ½ cup butter (softened)
- 2 teaspoon limoncello (or 1 teaspoon lemon extract or vanilla )
- ¼ cup crushed pineapple (drained)
- 5 cups powdered sugar
Instructions
- Preheat oven to 350-degrees F.
- Toast walnuts for approximately 8 minutes. Toast the shredded coconut on a separate tray for the last 4 minutes.
- Allow the nuts to cool off first, then let your pent-up frustrations out by placing them in a Ziploc bag and using a rolling pin to pound them. Or you can be more civilized and use a food processor.
- Mix the flour, baking powder, baking soda, cinnamon, and salt in a large bowl. Stir in chopped walnuts and raisins. Set aside.
- Next, add oil, apple sauce, sugars, and vanilla to the bowl of a stand mixer. Mix until thoroughly combined. Beat in eggs, then stir in carrots, pineapple, and ½ of the toasted coconut.
- Add the flour mixture (in batches) until the ingredients are incorporated.
- To make a layered cake, pour into 2 greased and floured 9½″ round cake pans. Bake for 30 minutes, or until a toothpick inserted in the middle comes out clean.
- Cool the cakes for 10 minutes then invert them onto a wire rack. Slowly peel off the parchment paper. Cool completely before frosting.
- If baking the carrot cake in a 9″ x13″ pan, leave the cake in the pan until completely cooled before frosting the top.
Prepare Frosting
- Beat the softened cream cheese and butter until combined.
- Add lemon extract (or limoncello), and strained crushed pineapple and continue to mix.
- Finally, add powdered sugar in batches, until fluffy.
- Spread frosting between, on top, and on the sides of the cooled round cakes. I like to sprinkle some of the coconut in between the two layers as well. Using a rotating cake stand is very helpful!
- Sprinkle the frosted cake with the remaining toasted coconut.
Notes
- Carrot cake is pretty high in calories. To cut down on some of the calories, you can use unsweetened applesauce to replace some of the oil with equal parts of applesauce. Another idea is to use unsweetened shredded coconut and low-fat cream cheese.
- You can use this recipe to make carrot cake cupcakes instead. Simply pour the cake batter into greased or lined cupcake pan and bake for approximately 30 minutes.
- To save on time, you can skip toasting the walnuts and coconut, but I think it's worth the extra 10 minutes.
- Mixing in the raisins and walnuts with the flour first coats them with flour which keeps them from sinking to the bottom of the cake.
- I like to use a measuring cup to divide the batter between the two pans so that it's equally divided.
- An easy way to fit the parchment paper in the round pans is to trace the bottom of the pans onto the parchment paper. Next, fold the parchment paper in half and cut around the drawn lines to make a half-circle. Now you have a perfectly sized piece of parchment paper to go on the bottom of the round pans.
Marietta Dorgan says
I would love to make your carrot cake in a 9 x 13 inch pan. How long should I bake it?
Hilda Sterner says
Hi Mariette, Depending on your oven, I'd give it 35-45 minutes to bake.
Pat R. says
If I use crushed, canned pineapple, should it be in its own juice or in syrup?
Hilda Sterner says
Its own juice. 🙂
Pam Roberts says
I have given it the title “best carrot cake” but I can’t find the amounts of ingredients. I’d love to know the portions of ingredients. Can anyone help?
Hilda Sterner says
Hi Pam,
The detailed instructions and ingredients are in the bottom of the post (in the recipe card). That's also where you can rate the recipe if you'd like. Thank you!
Vickie says
I don’t want the oil so replace the whole cup of oil with a whole cup of apple sauce. Just want to be clear don’t want to mess this up. Thank you!
Hilda Sterner says
Hi Vickie, no, you would want to replace some of the oil, not all of it. Carrot cake is pretty high-calorie. To cut down on some of the calories, you can use unsweetened applesauce and replace some of the oil with equal parts of applesauce. I wouldn't go lower than 3/4 cups of oil. In that case, I would add 2 containers of applesauce instead of one.
Tammie Chrysler says
This was amazing and super moist. I am a huge carrot cake fan and this is now at the top of my list of favorites! You’ve got to try this! Thank you, Hilda!
HildaSterner says
Thanks for your comment, Tammie. I'm so glad you liked it!
Kathy Fisher says
This is by far the very best carrot cake ever!!! Excellent. Try it. You won't be sorry. You can get rid of all other recipes for carrot cake. This rising to the top.
HildaSterner says
Oh yay, I wasn't sure if it was still moist enough, so glad you approve!
Kelly Methey says
Oh my gosh! I love carrot cake but will be leaving out the raisins! Can’t wait to get all the ingredients to try this!
HildaSterner says
Yeah, the raisins are totally optional! 🙂
Marguerite Amstadt says
The best carrot cake I have eaten and carrot cake is my all time favorite! Enjoy!!!
HildaSterner says
I'm so glad you liked it, thank you very much for the review!
Karen Gernand says
I don't eat cream cheese but really like the cake, which is almost always slathered in cream cheese. Do you have an alternative? Also, I gave up sugar for lent but have no qualms with date syrup, maple syrup, honey, etc. Do you know if substitutions will work? Thank you. This weekend feels like a baking weekend, after a week of quarantine.
HildaSterner says
Hi Karen,
If you don't like cream cheese frosting, you can use any other type of frosting that you prefer. Or leave it off completely (bake in a sheetpan) or use a lemon glaze instead, maybe in a bundt cake? As for the sugar substitute, coconut sugar should work, although I haven't personally tried it in this recipe. If you decide to use it, just substitute it for the same amount as the sugar in the recipe. Good luck!