Classic Carrot Cake in a Jar

By Mila | Updated on August 29, 2025

I’ve always loved carrot cake, but let’s be honest—making a full layer cake from scratch isn’t something I do on a Tuesday night. That’s where these carrot cakes in a jar come in. They give you all the spiced, tender cake and cream cheese frosting you’re craving without the fuss of frosting layers or worrying if your cake will make it to the table in one piece.

Plus, jars are just fun. You can make them ahead, stick them in the fridge, and pull one out whenever someone needs a treat. They’re great for lunchboxes, potlucks, or when you want dessert but don’t want to commit to cutting a whole cake. The kids think they’re getting something special, and honestly, they are.

This recipe has everything I want in a carrot cake—cinnamon, pecans, pineapple, and plenty of cream cheese frosting. And since they’re portioned out already, nobody has to fight over who got the bigger slice.

carrot cake in a jar
Image: theamazingfood.com / All Rights reserved

Why You’ll Love This Carrot Cake in a Jar

  • Perfect portion control – Baking individual servings in jars means everyone gets their own personal dessert, and you won’t be tempted to eat the whole cake in one sitting.
  • Great for gifting – These cute jars make thoughtful homemade gifts for friends, neighbors, or coworkers, and they’re easy to transport without worrying about frosting getting smashed.
  • Classic carrot cake flavor – With warm spices, sweet pineapple, crunchy pecans, and shredded carrots, you get all the traditional flavors you love in a fun new format.
  • Make-ahead friendly – You can bake these ahead of time and store them in the fridge, making them perfect for parties, potlucks, or meal prep.
  • Fun presentation – The layers of moist cake and creamy frosting visible through the glass jar make this dessert look as good as it tastes.

What Kind of Carrots Should I Use?

Fresh carrots are definitely the way to go for this recipe – pre-shredded carrots from a bag tend to be dry and won’t give you the same moist, flavorful result. Regular orange carrots work perfectly fine, though you could also use rainbow carrots if you want to add a fun pop of color to your cake. Make sure to peel your carrots before grating them, and aim for a medium-fine shred so they distribute evenly throughout the batter and bake up nice and tender. If your carrots seem a bit dry or old, give them a quick rinse before shredding to add back a little moisture.

carrot cake in a jar
Image: theamazingfood.com / All Rights reserved

Options for Substitutions

This recipe is pretty forgiving when it comes to swaps, so here are some options if you need them:

  • Coconut oil: If you don’t have coconut oil, just use more butter or try vegetable oil. The texture will stay the same, though you’ll lose that subtle coconut flavor.
  • Wheat flour: You can replace the wheat flour with all-purpose flour for a lighter cake, or use the full 2 cups of all-purpose instead of splitting it. Whole wheat flour adds a nuttier taste, but regular flour works fine.
  • Pineapple: Fresh or canned pineapple both work here. If using canned, make sure to drain it well so your batter doesn’t get too wet. You can also leave it out if you’re not a fan, though it does add nice moisture.
  • Pecans: Walnuts are a classic swap for pecans in carrot cake. You could also try chopped almonds or just skip the nuts altogether if there are allergies to consider.
  • Coconut: Not into coconut? Just leave it out or add extra nuts or raisins instead for texture.
  • Brown sugar: In a pinch, you can use all granulated sugar, though brown sugar gives the cake a deeper, more caramel-like flavor.

Watch Out for These Mistakes While Baking

The biggest mistake when baking carrot cake in jars is overfilling them before baking, which causes the batter to overflow and create a mess – fill your jars only halfway to allow room for the cake to rise properly.

Another common error is not draining your pineapple well enough, as excess moisture can make your cake dense and soggy instead of light and fluffy, so press it between paper towels to remove as much liquid as possible.

When assembling your jars, make sure your cake layers are completely cool before adding the cream cheese frosting, otherwise the heat will melt the frosting and turn your pretty layers into a runny disaster.

Finally, don’t skip grating your own carrots – pre-shredded carrots from the bag are often dry and contain additives that can affect the texture of your cake.

carrot cake in a jar
Image: theamazingfood.com / All Rights reserved

What to Serve With Carrot Cake in a Jar?

Carrot cake in a jar is already pretty rich and sweet on its own, so I like to keep things simple when serving it. A hot cup of coffee or tea is really all you need to balance out the sweetness and make it feel like a complete dessert experience. If you’re serving this at a party or gathering, set out some fresh berries on the side – strawberries or raspberries add a nice tart contrast to the cream cheese frosting. You could also offer some vanilla ice cream for anyone who wants to go all out, though honestly, these little jars are satisfying enough to enjoy straight up with just a spoon.

Storage Instructions

Store: Keep your carrot cake jars in the refrigerator since they have cream cheese frosting. They’ll stay fresh for up to 5 days when covered with lids or plastic wrap. The jars make it super easy to grab one whenever you want a sweet treat without having to cut into a whole cake.

Freeze: You can freeze these for up to 2 months if you want to make them way ahead. Just make sure to use freezer-safe jars and leave a little space at the top for expansion. Thaw them overnight in the fridge before enjoying.

Serve: These taste best when served chilled or at room temperature. If you froze them, let them sit out for about 20-30 minutes after thawing to take the chill off. The flavors actually get better after a day or two as everything melds together!

Preparation Time 25-35 minutes
Cooking Time 25-30 minutes
Total Time 50-65 minutes
Level of Difficulty Medium
Servings 10 jars

Estimated Nutrition

Estimated nutrition for the whole recipe (without optional ingredients):

  • Calories: 5900-6400
  • Protein: 54-64 g
  • Fat: 340-380 g
  • Carbohydrates: 670-720 g

Ingredients

For the cake:

  • 1.25 cups sugar
  • 1.25 cups brown sugar
  • 3/4 cup butter (melted and cooled for better moisture)
  • 1/3 cup coconut oil
  • 4 eggs (room temperature, about 70°F)
  • 1.25 tsp vanilla
  • 2.5 tsp cinnamon
  • 1/4 tsp cloves
  • 1/4 tsp nutmeg
  • 1 tsp baking soda
  • 2 tsp baking powder
  • 3/4 tsp salt
  • 1.75 cups flour (I always use King Arthur all-purpose flour)
  • 1/2 cup wheat flour
  • 3 cups carrots (finely shredded for best texture)
  • 8 oz pineapple
  • 3/4 cup coconut
  • 3/4 cup pecans

For the frosting:

  • 10 oz cream cheese (I prefer Philadelphia brand)
  • 1 cup butter (softened at room temperature to prevent lumps)
  • 4.5 cups powdered sugar

For the topping:

  • 3/4 cup pecans (toasted and chopped into 1/4-inch pieces)

Step 1: Prepare Mise en Place and Preheat

  • 3 cups carrots
  • 8 oz pineapple
  • 3/4 cup pecans

Preheat your oven to 350°F.

Finely shred the carrots and set aside—I find using the fine side of a box grater or a food processor gives the most tender texture in the finished cake.

Drain the pineapple well and chop into small pieces.

Coarsely chop the pecans for the batter and set aside separately from the toasted pecans you’ll use for topping.

Measure out all remaining dry ingredients and have everything ready before you start mixing, as the batter comes together quickly.

Step 2: Mix Wet Ingredients and Create the Batter Base

  • 1.25 cups sugar
  • 1.25 cups brown sugar
  • 3/4 cup butter
  • 1/3 cup coconut oil
  • 4 eggs
  • 1.25 tsp vanilla
  • 2.5 tsp cinnamon
  • 1/4 tsp cloves
  • 1/4 tsp nutmeg
  • 1 tsp baking soda
  • 2 tsp baking powder
  • 3/4 tsp salt
  • 1.75 cups flour
  • 1/2 cup wheat flour

In a large mixing bowl, combine the melted and cooled butter, coconut oil, sugars, eggs at room temperature, and vanilla.

Mix for about 1 minute until the mixture is well combined and slightly lightened in color.

The room-temperature eggs incorporate more smoothly and create a better emulsion with the fats.

Add the cinnamon, cloves, nutmeg, baking soda, baking powder, and salt; mix for 30 seconds just until combined.

Then add the flours and stir until no dry streaks remain—don’t overmix as this can toughen the cake.

Step 3: Fold in Mix-Ins and Bake

  • batter from Step 2
  • prepared carrots, pineapple, coconut, and pecans from Step 1

Fold the shredded carrots, drained pineapple, coconut, and chopped pecans from Step 1 into the batter using a rubber spatula with gentle, sweeping motions—folding rather than stirring keeps the cake tender.

Pour the batter into a parchment-lined baking pan and bake at 350°F for 22-25 minutes, until a toothpick inserted in the center comes out with just a few moist crumbs.

Allow the cake to cool completely in the pan before proceeding—this makes cutting the rounds much easier and prevents them from crumbling.

Step 4: Make the Cream Cheese Frosting

  • 10 oz cream cheese
  • 1 cup butter
  • 4.5 cups powdered sugar

While the cake cools, combine the softened butter and cream cheese in a clean bowl and beat together until smooth and well blended—I always use Philadelphia brand cream cheese as it has the right consistency and doesn’t have added gums.

Add the powdered sugar and mix for 1-2 minutes until light and fluffy.

The frosting should be spreadable and pipeable but still hold its shape.

If it seems too soft, refrigerate for 15-20 minutes before using.

Step 5: Toast Pecans and Prepare for Layering

  • 3/4 cup pecans
  • cooled cake from Step 3
  • frosting from Step 4

While the frosting sets if needed, toast the 3/4 cup of pecans for garnish in a dry skillet over medium heat for 3-4 minutes, stirring frequently, until fragrant and golden.

Chop them into 1/4-inch pieces and set aside.

Once the cooled cake from Step 3 is ready, use a round cutter (about 2-3 inches in diameter works well for standard jars) to cut out cake rounds.

Transfer the frosting from Step 4 into a piping bag fitted with a round or star tip for easy layering.

Step 6: Assemble Cakes in Jars and Finish

  • cake rounds from Step 5
  • frosting from Step 4
  • toasted pecans from Step 5

Beginning with a small dollop of frosting at the bottom of each jar to anchor the cake, alternate layers of cake rounds and frosting, pressing gently so each layer settles.

Continue layering until the jar is nearly full, finishing with a frosting layer on top for a polished appearance.

Sprinkle the toasted chopped pecans from Step 5 over the top of each jar as the final garnish.

These look beautiful and stay fresh in the refrigerator for up to 3 days, making them perfect for gift-giving or advance preparation.

carrot cake in a jar

Classic Carrot Cake in a Jar

Delicious Classic Carrot Cake in a Jar recipe with step-by-step instructions.
Prep Time 20 minutes
Cook Time 35 minutes
Total Time 57 minutes
Servings 10 jars
Calories 6150 kcal

Ingredients
  

For the cake::

  • 1.25 cups sugar
  • 1.25 cups brown sugar
  • 3/4 cup butter (melted and cooled for better moisture)
  • 1/3 cup coconut oil
  • 4 eggs (room temperature, about 70°F)
  • 1.25 tsp vanilla
  • 2.5 tsp cinnamon
  • 1/4 tsp cloves
  • 1/4 tsp nutmeg
  • 1 tsp baking soda
  • 2 tsp baking powder
  • 3/4 tsp salt
  • 1.75 cups flour (I always use King Arthur all-purpose flour)
  • 1/2 cup wheat flour
  • 3 cups carrots (finely shredded for best texture)
  • 8 oz pineapple
  • 3/4 cup coconut
  • 3/4 cup pecans

For the frosting::

  • 10 oz cream cheese (I prefer Philadelphia brand)
  • 1 cup butter (softened at room temperature to prevent lumps)
  • 4.5 cups powdered sugar

For the topping::

  • 3/4 cup pecans (toasted and chopped into 1/4-inch pieces)

Instructions
 

  • Preheat your oven to 350°F. Finely shred the carrots and set aside—I find using the fine side of a box grater or a food processor gives the most tender texture in the finished cake. Drain the pineapple well and chop into small pieces. Coarsely chop the pecans for the batter and set aside separately from the toasted pecans you'll use for topping. Measure out all remaining dry ingredients and have everything ready before you start mixing, as the batter comes together quickly.
  • In a large mixing bowl, combine the melted and cooled butter, coconut oil, sugars, eggs at room temperature, and vanilla. Mix for about 1 minute until the mixture is well combined and slightly lightened in color. The room-temperature eggs incorporate more smoothly and create a better emulsion with the fats. Add the cinnamon, cloves, nutmeg, baking soda, baking powder, and salt; mix for 30 seconds just until combined. Then add the flours and stir until no dry streaks remain—don't overmix as this can toughen the cake.
  • Fold the shredded carrots, drained pineapple, coconut, and chopped pecans from Step 1 into the batter using a rubber spatula with gentle, sweeping motions—folding rather than stirring keeps the cake tender. Pour the batter into a parchment-lined baking pan and bake at 350°F for 22-25 minutes, until a toothpick inserted in the center comes out with just a few moist crumbs. Allow the cake to cool completely in the pan before proceeding—this makes cutting the rounds much easier and prevents them from crumbling.
  • While the cake cools, combine the softened butter and cream cheese in a clean bowl and beat together until smooth and well blended—I always use Philadelphia brand cream cheese as it has the right consistency and doesn't have added gums. Add the powdered sugar and mix for 1-2 minutes until light and fluffy. The frosting should be spreadable and pipeable but still hold its shape. If it seems too soft, refrigerate for 15-20 minutes before using.
  • While the frosting sets if needed, toast the 3/4 cup of pecans for garnish in a dry skillet over medium heat for 3-4 minutes, stirring frequently, until fragrant and golden. Chop them into 1/4-inch pieces and set aside. Once the cooled cake from Step 3 is ready, use a round cutter (about 2-3 inches in diameter works well for standard jars) to cut out cake rounds. Transfer the frosting from Step 4 into a piping bag fitted with a round or star tip for easy layering.
  • Beginning with a small dollop of frosting at the bottom of each jar to anchor the cake, alternate layers of cake rounds and frosting, pressing gently so each layer settles. Continue layering until the jar is nearly full, finishing with a frosting layer on top for a polished appearance. Sprinkle the toasted chopped pecans from Step 5 over the top of each jar as the final garnish. These look beautiful and stay fresh in the refrigerator for up to 3 days, making them perfect for gift-giving or advance preparation.

Disclaimer: Our editorial team has used AI to create or enhance parts of this article. All content has been fact-checked by our team to ensure accuracy.

Leave a Comment

Recipe Rating