Beginner-Friendly Coconut Pineapple Cake

By Emily HarperUpdated:
Moist Coconut Pineapple Cake with golden-brown edges, flecked with shredded coconut and juicy pineapple bits.
Coconut Pineapple Cake with Coconut Milk
  • Total3 Hrs
  • Servings12
  • Calories952 kcal
The use of coconut milk creates a tender crumb that stays moist for days. This coconut pineapple cake balances creamy coconut with a bright, jammy fruit center.
  • Time: 25 min active + 35 min baking + 2 hrs chilling
  • Texture: Moist, tender cake with a thick, glossy filling
  • Serve with: A glass of cold milk or fresh sliced strawberries
  • Make ahead: Bake layers a day early and store wrapped at room temperature

Coconut Pineapple Cake

The scent of toasted coconut hitting a warm oven is the best part of this process. It's a bright, sunny dessert that feels like a vacation on a plate, making it a great choice for family gatherings or garden parties.

The heart of this recipe is the full-fat coconut milk. While regular milk provides moisture, coconut milk adds a richness and a specific tropical fragrance that you just can't get from extracts alone. It keeps the crumb tender and prevents the cake from drying out.

You can expect a cake that is light but satisfying, with a pineapple filling that holds its shape instead of soaking into the sponge. It's a balanced treat that isn't overly sweet.

Why This Works

  • Coconut Milk Fat: The natural fats in coconut milk create a tighter, more moist crumb than cow's milk.
  • Cornstarch Stability: Adding cornstarch to the pineapple juice creates a gel that prevents the filling from leaking out of the layers.
MethodTimeTextureBest For
From Scratch3 hoursTender, complex flavorSpecial occasions
With Cake Mix1 hourSpongier, sweeterQuick weeknight treats

Tools You'll Need

You'll need two 9-inch round cake pans and a wire rack for cooling. A silicone spatula is helpful for folding in the coconut without deflating the batter. For the frosting, a stand mixer such as KitchenAid makes the powdered sugar integrate smoothly, though a hand mixer works too.

Ingredient Deep Dive

The balance of fats and acids here is what makes the texture work. The lemon juice in the filling cuts through the richness of the coconut cream frosting.

IngredientWhat It DoesBest Swap
Coconut MilkAdds fat and tropical flavorEvaporated milk (less flavor)
CornstarchThickens the pineapple fillingFlour (makes it cloudier)
Powdered SugarCreates a smooth frostingGranulated sugar (will be grainy)

Cake Base

  • 3 cups (375 g) all-purpose flour
  • 1 1/2 cups (300 g) granulated sugar
  • 1 tbsp (12 g) baking powder
  • 1/2 tsp (3 g) salt
  • 1 cup (225 g) unsalted butter, softened Why this? Softened butter creams better with sugar for air
  • 4 large eggs, room temperature
  • 1 cup (240 ml) full-fat coconut milk, shaken Why this? Provides the signature moisture and taste
  • 1 tsp (5 ml) vanilla extract
  • 1 cup (110 g) sweetened shredded coconut

Pineapple Filling

  • 1 can (20 oz / 567 g) crushed pineapple, drained (reserve 2 tbsp juice)
  • 1/4 cup (50 g) granulated sugar
  • 2 tbsp (16 g) cornstarch
  • 1 tbsp (15 ml) lemon juice

Coconut Cream Frosting

  • 1 1/2 cups (340 g) unsalted butter, softened
  • 5 cups (600 g) powdered sugar, sifted
  • 3 tbsp (45 ml) heavy cream or coconut cream
  • 1 tsp (5 ml) vanilla extract
  • 1 cup (110 g) sweetened shredded coconut, for topping

Key Numbers

Monitor these three key points to preserve the cake's moisture.

  • Oven Temp: 350°F (180°C) for the cake and 325°F (160°C) for the coconut.
  • Bake Time: 30–35 minutes.
  • Filling Chill: 2 hours in the refrigerator.

Key Steps

Stage 1: Preparing the Base

Preheat oven to 350°F (180°C). Grease and flour two 9-inch round cake pans. In a large bowl, cream the softened butter and sugar until pale and fluffy. Beat in the eggs one at a time, then beat in the vanilla extract. Sift in the flour, baking powder and salt, alternating with the coconut milk.

Mix until just combined. Gently fold in the sweetened shredded coconut with a silicone spatula until just combined.

Stage 2: Baking to Perfection

Divide the batter evenly between the pans. Bake 30–35 minutes until the edges just begin to pull away from the sides of the pan, a toothpick inserted into the center comes out clean or with a few moist crumbs, and the top springs back when lightly pressed.

Cool the cakes in the pans for 15 minutes, then move them to a wire rack to cool completely.

Two baked golden-brown coconut cakes in round cake pans.

Stage 3: Simmering the Filling

In a small saucepan, whisk together the reserved pineapple juice, sugar and cornstarch. Stir in the drained crushed pineapple and lemon juice. Place over medium heat and stir constantly for 5–7 minutes until the mixture thickens into a jam-like consistency and looks glossy. Remove from heat.

Refrigerate the filling until completely chilled, about 2 hours.

Thick, glossy yellow pineapple filling in a small saucepan.

Stage 4: Assembling the Layers

Preheat oven to 325°F (160°C). Spread the topping coconut on a baking sheet and toast for 3–5 minutes, stirring every 60 seconds, until pale golden brown and nutty in smell. Level the completely cooled cakes with a serrated knife. Place one cake layer on a plate.

Spread the chilled pineapple filling over it, leaving a small border around the edge to prevent leaking. Top with the second cake layer.

Two cake layers stacked with a yellow pineapple filling in the middle.

Stage 5: The Final Frosting

Beat the softened butter until smooth. Gradually beat in the sifted powdered sugar, then the heavy cream and vanilla extract, until light and fluffy. Frost the top and sides of the cake with the coconut cream frosting. Press the toasted coconut into the sides for a snowy finish.

Problems and Solutions

Fixing Runny Filling

If the pineapple mixture looks like soup after 7 minutes, simmer it for another 2–3 minutes. Cornstarch needs a full boil to activate its thickening power. If it still feels loose, make sure it chills for the full 2 hours, as it firms up significantly in the cold.

When Cakes Sink in Middle

This usually happens if the oven door is opened too early or if the baking powder is old. Avoid peeking before the 30-minute mark. If it happens, you can simply level the cake with a serrated knife and fill the dip with a little extra frosting.

Soft or Sliding Frosting

Butter-based frosting melts if the cake is even slightly warm. Ensure the layers are completely cool to the touch before frosting. If the frosting is too soft to spread, chill the bowl for 10 minutes and beat it again.

Original IngredientSubstituteWhy It Works
Full-fat Coconut MilkEvaporated MilkSimilar thickness. Note: Loses the coconut flavor
Heavy CreamCoconut Creamdairy-free alternative. Note: Adds a richer coconut taste. For a fully dairy-free result, also replace these with plant-based versions: unsalted butter.
All-Purpose FlourCake FlourCreates a finer crumb. Note: Cake will be softer

Storage Guidelines

Keep the assembled cake in an airtight container in the refrigerator for up to 4 days. Because of the butter in the frosting and the fruit filling, it needs refrigeration to stay safe.

For the best experience, let the cake sit at room temperature for 30–60 minutes before serving. This allows the butter to soften, which restores the rich texture of the sponge.

If you want to freeze it, wrap unfrosted cake layers in plastic wrap and then foil. They keep for up to 3 months. Thaw them in the fridge overnight before you start the frosting and assembly process.

Make It Your Own

Feel free to customize the flavors of this coconut pineapple cake to suit your taste.

Lime Zest Twist

Stir 1 tablespoon of fresh lime zest into the cake batter and an additional teaspoon into the pineapple filling. The brightness of the citrus makes the coconut flavor stand out.

Toasted Almond Crunch

Replace the coconut topping with toasted sliced almonds to add a salty, nutty contrast to the sweet frosting.

Fruit Swaps

For a richer sweetness that still feels tropical, fold 1/2 cup of finely diced fresh mango into the pineapple filling. If you are craving something different, try a Carrot Cake Cupcakes recipe for a more earthy flavor.

Pairing Ideas

A slice of golden sponge cake on a white plate, topped with snowy shredded coconut and bright yellow pineapple.

Since this cake is quite indulgent, it pairs well with beverages that offer a bright or sharp contrast. A cold brew coffee or tangy hibiscus tea helps balance the creamy frosting.

To present it as a plated dessert, serve a slice alongside a dollop of whipped cream and some fresh raspberries. The zing of the berries offsets the richness of the coconut milk. For another light option, a Heavenly White Snack Cake is an excellent choice for smaller groups.

Frequently Asked Questions

Does the toothpick need to come out completely clean for the cake to be done?

That's a myth. Bake 30–35 minutes at 350°F (180°C). The cake is ready when the edges just pull away from the pan, the toothpick comes out clean or with a few moist crumbs, and the top springs back when lightly pressed.

A completely clean toothpick often means the cake is already slightly overbaked and drier.

Can I bake the batter in a 9x13 pan or three 8-inch pans?

Yes, but the bake time will change. The batter is meant for two 9-inch round pans, so the layers are thicker than a 9x13 would give you. A 9x13 pan or smaller 8-inch layers will bake faster, so start checking early using the edge and toothpick signs rather than the 30–35 minute mark.

Grease and flour the pans as the method says, whatever pan you use.

Should I use sweetened or unsweetened coconut, and can I use desiccated coconut?

Use sweetened shredded coconut. The sugar in it adds sweetness and softness to the crumb, which matters because the frosting is also sweet. Unsweetened or desiccated coconut is drier and less sweet, so the cake will taste flatter and may feel drier after baking.

Could I swap the coconut milk for regular milk and still keep the cake moist?

Yes, but expect a lighter, less rich crumb. Full-fat coconut milk brings extra fat and a clear coconut flavor, so regular milk will give a milder cake that stays moist for a shorter time. Shake the coconut milk well before measuring so the fat and liquid are evenly mixed.

How much sugar goes into the pineapple filling?

Use 1/4 cup (50 g) granulated sugar. Whisk it in a small saucepan with the 2 tbsp reserved pineapple juice and 2 tbsp (16 g) cornstarch before adding the drained crushed pineapple and 1 tbsp lemon juice. Stir constantly over medium heat for 5–7 minutes until it thickens and looks glossy.

Why do I need to toast the topping coconut?

Toast it at 325°F (160°C) for 3–5 minutes, stirring every 60 seconds. Toasting turns the coconut pale golden and gives it a nutty smell and flavor that plain coconut lacks. Stop when it reaches a pale golden brown, because it keeps darkening on the hot tray.

How long can I keep the assembled cake, and does it need to sit out before serving?

Keep it refrigerated in an airtight container for up to 4 days. To ensure safety, the cake must stay chilled due to the pineapple filling and butter-based frosting.

For the best texture, let slices sit at room temperature for 30–60 minutes before serving, allowing the butter to soften and the sponge to regain its richness.

Coconut Pineapple Cake

Coconut Pineapple Cake with Coconut Milk – Recipe Card
Coconut Pineapple Cake with Coconut Milk, Recipe Card
4.8 / 5 (6 Reviews)
Preparation time:25 Mins
Cooking time:35 Mins
Resting time:2 Hrs
Total time:3 Hrs
Servings:12 servings
Category: DessertCuisine: American
print Pin

Ingredients:

Instructions:

Nutrition Facts
Per serving
Calories
952 calories
% Daily Value*
Total Fat 51.6 g
   Saturated Fat 34.7 g
Sodium 243 mg
Total Carbohydrate 121.9 g
   Dietary Fiber 2.6 g
   Total Sugars 91.6 g
Protein 7.1 g
* Percent Daily Values are based on a 2,000 calorie diet.
Rate This Recipe
Pick your stars
Your Turn:
Submit Review:
Rating Breakdown
5
(5)
4
(1)
3
(0)
2
(0)
1
(0)
Recipe Comments:
Sebastian

I made this Southern Coconut Cake for Easter dinner and it was a total showstopper! The coconut milk really makes it extra moist and the flavor is just perfect. My family loved it and I'm definitely making it again for next year's holiday gathering!
E. Hudson

I made this cake for Easter dinner and it was a total showstopper! The coconut milk really makes the cake super moist and the flavor is just amazing! Everyone raved about it and I'm definitely making it again for Christmas!
Victoria Morgan

Best cake I've ever made!
Sophie39

I'm obsessed with this Southern Coconut Cake recipe! I made it for my family's Easter dinner and it was a total hit. I used 1 1/2 cups of unsweetened shredded coconut instead of 1 cup and it added so much extra flavor and texture. I also added a
Ellie92

Love this recipe! Easy to make and the cake is so moist and delicious!
YummyBread7992

Oh my gosh, this cake is a dream! So moist and coconut-y!
Jump to Recipe