Pineapple Coconut Cake Bars with Sweet Vanilla Glaze 🍍🥥

Introduction

Pineapple Coconut Cake Bars are soft, moist dessert bars filled with tropical pineapple flavor, sweet coconut, and a simple vanilla glaze. They have the comforting texture of a homemade cake but are baked in a rectangular pan and sliced into convenient bars, making them perfect for parties, potlucks, holidays, or an easy family dessert.

Crushed pineapple keeps the center wonderfully moist, while coconut adds sweetness and texture. Once the bars are baked until golden around the edges, a thin vanilla glaze is spread over the warm surface. It settles into the top and creates the glossy finish that makes these bars especially tempting.

The recipe is straightforward and uses simple pantry ingredients, yet the finished dessert tastes rich and homemade.

Why You Will Love This Recipe

These pineapple coconut bars are incredibly moist without requiring complicated cake-making techniques.

The pineapple provides both flavor and moisture, while shredded coconut adds a subtle chewy texture.

Another advantage is that you do not need to prepare a thick layer of frosting. The light vanilla glaze complements the tropical cake without overpowering it.

The bars are also easy to transport and serve because they can be sliced ahead of time.

Recipe Information

Prep Time: 15 minutes

Bake Time: 30–35 minutes

Cooling Time: 30 minutes

Total Time: About 1 hour 20 minutes

Servings: 12–16 bars

Difficulty: Easy

Main Ingredients

Crushed pineapple: The key ingredient for moisture and tropical flavor. Pineapple packed in juice works especially well.

Shredded coconut: Sweetened shredded coconut gives the bars a slightly chewy texture and complements the pineapple.

Butter: Melted butter adds richness and helps create tender bars.

Brown sugar: Adds sweetness along with a subtle caramel-like flavor.

Eggs: Provide structure and help keep the bars soft.

Vanilla: Enhances both the cake and the glaze.

Ingredients

For the Pineapple Coconut Bars

2 cups all-purpose flour

1 teaspoon baking powder

½ teaspoon baking soda

½ teaspoon salt

½ cup unsalted butter, melted and slightly cooled

¾ cup granulated sugar

½ cup light brown sugar, packed

2 large eggs

1 teaspoon vanilla extract

1 can (20 ounces) crushed pineapple in juice

1 cup sweetened shredded coconut

½ cup sour cream

For the Vanilla Glaze

1½ cups powdered sugar

2–3 tablespoons pineapple juice or milk

1 tablespoon melted butter

½ teaspoon vanilla extract

Small pinch of salt

How to Choose the Best Ingredients

Use crushed pineapple rather than large pineapple chunks. Small pieces distribute more evenly throughout the batter and help produce the moist texture these bars need.

When opening the pineapple, reserve a little juice before draining any excess. The juice can be used in the glaze to intensify the pineapple flavor.

Sweetened shredded coconut gives the dessert a classic sweet coconut flavor. Unsweetened coconut can also be used if you prefer a less-sweet result.

For the butter, regular unsalted butter allows you to control the salt level.

Fresh eggs and full-fat sour cream provide the richest texture.

Prepare the Pineapple

Place the crushed pineapple in a fine-mesh strainer.

Allow some excess juice to drain away, but do not squeeze the pineapple completely dry. You want some moisture remaining in the fruit.

Reserve approximately 3 tablespoons of pineapple juice for the glaze.

If your pineapple is packed in heavy syrup rather than juice, drain it more thoroughly because the syrup can make the bars excessively sweet.

Prepare the Baking Pan

Preheat the oven to 350°F (175°C).

Lightly grease a 9×13-inch baking pan.

For especially easy removal, line the pan with parchment paper, leaving some parchment extending over two opposite sides.

This creates handles that allow you to lift the entire dessert from the pan after cooling.

Prepare the Batter

In a medium bowl, whisk together the flour, baking powder, baking soda, and salt.

Set the dry mixture aside.

In a larger bowl, combine the melted butter, granulated sugar, and brown sugar.

Whisk until smooth.

Add the eggs one at a time, mixing well after each addition.

Stir in the vanilla extract and sour cream.

Add the crushed pineapple and shredded coconut.

Mix gently until everything is evenly distributed.

Gradually fold the dry ingredients into the wet mixture.

Stop mixing as soon as no obvious streaks of dry flour remain.

Overmixing can make the finished bars heavier and tougher.

Step-by-Step Instructions

  1. Preheat the oven to 350°F (175°C).
  2. Grease or parchment-line a 9×13-inch baking pan.
  3. Drain the crushed pineapple lightly, reserving several tablespoons of juice.
  4. Whisk together flour, baking powder, baking soda, and salt.
  5. In another bowl, combine melted butter, granulated sugar, and brown sugar.
  6. Whisk in the eggs and vanilla.
  7. Add the sour cream, crushed pineapple, and shredded coconut.
  8. Fold the dry ingredients into the pineapple mixture until just combined.
  9. Spread the batter evenly in the prepared baking pan.
  10. Bake for approximately 30–35 minutes.
  11. Check the center with a toothpick. A few moist crumbs are fine, but there should not be wet batter.
  12. Remove the pan from the oven and allow the bars to cool slightly.
  13. Meanwhile, combine powdered sugar, melted butter, vanilla, and 2 tablespoons of reserved pineapple juice.
  14. Whisk until smooth.
  15. Add another small amount of juice if necessary until you have a pourable but not watery glaze.
  16. Spread or drizzle the glaze over the slightly warm bars.
  17. Allow the dessert to cool completely so the glaze can set.
  18. Slice into long rectangular bars or smaller squares and serve.

Tips for Best Results

Do not completely dry the crushed pineapple. Some pineapple moisture is essential for achieving a soft interior.

At the same time, avoid pouring the entire can of pineapple juice into the batter. Too much liquid can prevent the center from setting correctly.

Measure the flour carefully. Spoon flour into the measuring cup and level the top instead of packing it tightly.

Do not overmix after adding the flour.

For the glossy finish shown in this style of dessert, apply the glaze while the bars are still slightly warm. A little glaze will melt into the surface while the rest remains visible on top.

Allow the bars to cool before slicing. Warm cake is more fragile and may break when cut.

Flavor Variations

For pineapple pecan bars, fold ½ cup chopped pecans into the batter.

For pineapple macadamia bars, add chopped macadamia nuts for an even more tropical flavor.

For lemon pineapple bars, add fresh lemon zest to the batter and lemon juice to the glaze.

For coconut lovers, add ½ teaspoon coconut extract along with the vanilla.

You can also toast some coconut separately and sprinkle it over the glaze before it completely sets.

How to Serve

These bars are delicious at room temperature and do not require any additional toppings.

For a more indulgent dessert, serve a slightly warm bar with vanilla ice cream.

Fresh pineapple or berries can provide a refreshing contrast.

For parties, cut the cake into smaller squares instead of long bars. This produces more individual servings and makes them easier to eat by hand.

Coffee and hot tea both pair especially well with the sweet pineapple-coconut flavor.

Meal Prep and Storage

Once the glaze has completely set, place the bars in an airtight container.

They can be kept at room temperature for approximately 1–2 days in a cool environment.

For longer storage, refrigerate them for up to 4–5 days.

Allow refrigerated bars to sit at room temperature for 15–20 minutes before serving for a softer texture.

You can also freeze unglazed bars. Wrap individual portions securely and place them in a freezer-safe container. Thaw them before adding fresh glaze.

Common Mistakes to Avoid

One of the biggest mistakes is adding too much pineapple liquid. The fruit should remain moist, but excessive juice can make the center gummy.

Another mistake is baking the bars for too long. Because pineapple keeps the interior moist, the cake may appear very soft while hot. It firms as it cools.

Avoid aggressively mixing the batter after adding the flour.

Do not make the glaze excessively thin. It should slowly flow from a spoon rather than run like water.

Finally, resist slicing immediately after glazing. Allowing the bars to cool produces much cleaner rectangular portions.

FAQ

Can I use fresh pineapple?

Yes, but finely chop it and remove excessive juice before adding it to the batter.

Can I leave out the coconut?

Yes. The recipe can be prepared without coconut, although the texture and flavor will be slightly different.

Can I make these ahead of time?

Yes. These bars are an excellent make-ahead dessert and can be prepared the day before serving.

Why are my pineapple bars too wet?

The pineapple probably contained too much liquid, or the bars needed additional baking time.

Can I use pineapple juice in the glaze?

Yes. In fact, pineapple juice gives the glaze additional flavor and pairs beautifully with the cake.

How do I know when they are baked?

The edges should be golden, the center should look set, and a toothpick inserted near the center should come out without wet batter.

Can I add nuts?

Absolutely. Pecans, walnuts, or macadamia nuts all pair well with pineapple and coconut.

Final Thoughts

Pineapple Coconut Cake Bars with Vanilla Glaze combine juicy pineapple, coconut, and a soft buttery cake into a simple dessert that looks just as good as it tastes. The thin glaze adds sweetness while allowing the moist pineapple flavor underneath to remain the star.

They are easy enough for an everyday treat but attractive enough for holidays, parties, and potlucks. Let the glaze settle over the warm cake, allow everything to cool, then slice it into generous rectangular bars for a sweet tropical dessert.