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

This carrot cake with pineapple and coconut 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 my husband Scott's birthday, which is 12 days after mine, and I make it for him. Luckily, it's his favorite cake too!
So what makes this carrot cake with pineapple and coconut 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.
Jump to:
😍 Why You'll Love This Recipe
- This carrot cake with pineapple and coconut recipe is so flavorful and delicious, everyone will want the recipe!
- It's a fool-proof carrot cake recipe that anyone can master. If making a layered cake is too intimidating, just bake it in a sheet pan.
- This recipe requires simple pantry staples that you most likely already have, plus carrots and eggs.
- Leftovers (if you have any) can be frozen for up to 3 months!
🔖 Ingredient & Substitutions
Cream Cheese Frosting Ingredients
- Crushed Pineapple: Canned crushed pineapple helps to make this delicious carrot cake even moister. We'll include a small amount of liquid in the can for added flavor. If using fresh coconut, you'll need to blend it with a food processor to give it the right texture.
- 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. Try my applesauce recipe!
- Oil: Feel free to use avocado oil, vegetable 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: Ground cinnamon and sea salt. If you'd like, you can also add a small amount of nutmeg and or ground cloves.
- Flavoring: We'll add vanilla extract to the batter and some pinapple juice in the frosting.
🍰 Carrot Cake with Pineapple and Coconut
Preheat oven to 325F
Step 1: Toast walnuts for approximately 10 minutes. Toast shredded coconut on a separate tray for the last 5 minutes.
Pro Tip: Keep an eye on the coconut, it can burn quickly!
Step 2: Allow walnuts to cool, then grind in a small food processor, or chop by hand.
Step 3: Whisk all-purpose flour, baking powder, baking soda, ground cinnamon, and salt in a large mixing bowl. Stir in raisings, ground walnuts (set aside ¼ cup to decorate the frosted cake), and half of the toated coconut.
Step 4: Pour oil into the bowl of a stand mixer, followed by applesauce, and both sugars; mix to combine. Add vanilla extract and eggs and beat to incorporate. Finally, stir in grated carrots, one cup drained pineapple, and 1 tablespoon pineapple juice.
Step 5: Gradually add the dry ingredients to the wet ingredients and mix on low speed to blend.
Step 6: To make a 2-layer cake, divide the cake batter between two 9-inch round cake pans sprayed with oil and lined with parchment paper. (see tip further down on how to cut the parchment paper to fit the pan).
Step 7: Place both cakes on the center rack and bake for 30 minutes, or until a toothpick inserted in the middle comes out clean.
Pro Tip: Oven temperatures vary so I recommend keeping an eye on the cakes to make sure they don't burn
Would you like to save this recipe?
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.
Pro Tip: If baking the carrot cake in a 9" x 13" pan, leave the cake in the pan until completely cooled before frosting the top.
Prepare Cream Cheese Frosting
Step 1: Beat softened cream cheese and butter until combined.
Step 2: Add pineapple juice and strained crushed pineapple and mix until blended.
Step 3: Gradually add powdered sugar, 1 to 2 cups at a time, and mix 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.
If you love the combination of coconut and pineapple as much as I do, be sure to try this Hawaiian Pineapple Coconut Cake! It's moist and delicious and bursting with pineapple and coconut flavor!
🤷🏻♀️ Recipe FAQs
Cover any leftover carrot cake with plastic wrap and store it 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.
Raisins are a traditional ingredient in many carrot cake recipes because they add sweetness and texture, but you can absolutely leave them out, if you prefer.
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
- This carrot cake with pineapple and coconut 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. Use unsweetened shredded coconut, instead of sweetened, and substitute low-fat cream cheese.
- You can use this recipe to make carrot cake cupcakes instead. Simply pour the cake batter into a greased or lined cupcake pan and bake for approximately 30 minutes.
- Mixing the raisins, walnuts, and toasted coconut with the dry ingredients 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, but you can eyeball it if you prefer.
- Store your leftover carrot cake with pineapple and coconut in an airtight container in the fridge for up to a week.
How to cut parchment paper into circles
The simplest way to cut round parchment paper to fit your cake pan is to place the pan on the paper, trace around the bottom, then fold the circle in half and trim along the line with scissors.
🥮 More Dessert Recipes
If you love this carrot cake with pineapple and coconut, try these other recipes too!
📖 Recipe
Carrot Cake with Pineapple and Coconut
Equipment
- 2 9″ round cake pans
Ingredients
- 1 cup toasted walnuts (divided)
- 1 cup unsweetened shredded coconut (divided)
- 2 cup all-purpose flour
- 2 teaspoon baking powder
- 1 teaspoon baking soda
- 2 teaspoon cinnamon powder
- 1 teaspoon sea 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 (½ lb)
- 1 cup canned crushed pineapple (drained)
- 1 tablespoon pineapple juice
Cream Cheese Frosting
- 1 8 oz cream cheese (softened)
- ½ cup butter (softened)
- 2 teaspoon pineapple juice (or vanilla extract)
- ¼ cup crushed pineapple (drained)
- 4 cups powdered sugar
Instructions
Preheat oven to 325℉
- Toast walnuts for approximately 10 minutes. Toast shredded coconut on a separate tray for the last 5 minutes.
- Allow walnuts to cool, then grind using a small food processor.
- Whisk all-purpose flour, baking powder, baking soda, ground cinnamon, and salt in a large mixing bowl. Stir in chopped walnuts (minus ¼ cup for decorating the frosted cake), and half of the toasted coconut.
- Next, add vegetable oil, apple sauce, both 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, crushed pineapple, and 2 teaspoons pineapple juice.
- Gradually add dry ingredients to the wet ingredients and mix until incorporated.
- To make a 2-layer cake, divide the cake batter between two 9-inch round cake pans sprayed with non-stick cooking spray and lined with parchment paper. (see tips in post on how to cut the parchment paper to fit the pan).
- Place in the middle rack of a preheated oven and 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. Allow them to come to room temperature before frosting.
Prepare Frosting
- Beat softened cream cheese and butter until combined.
- Add 2 teaspoons pineapple juice or vanilla extract, strained crushed pineapple, and continue to mix. Gradually add powdered sugar in batches and mix until fluffy.
- Spread frosting between, on top, and on the sides of the cooled cakes. Sprinkle some of the toasted coconut and walnuts in between the two layers, then sprinkle the rest over the frosted cake.
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.
- Mixing in the raisins, walnuts, and coconut with the dry ingredients 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, however, you can eyeball it too.
- 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.
- Using a revolving cake stand is very helpful when frosting the cake!
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!