These soft and warmly spiced sourdough carrot cake bars are made with sourdough discard and baked in a simple 9×13 pan for an easy dessert that’s perfect for spring.
Preheat the oven to 350°F. Lightly grease a 9×13-inch baking pan or line it with parchment paper.
In a medium bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
In a large bowl, whisk together the oil, melted butter, brown sugar, and granulated sugar until smooth and well combined.
Add the eggs one at a time, whisking well after each addition. Stir in the sourdough discard and vanilla extract until fully incorporated.
Stir in the finely grated carrots. If adding nuts, fold them in at this stage.
Add the dry ingredients to the wet ingredients and gently fold until just combined. Do not overmix.
Spread the batter evenly into the prepared pan and smooth the top.
Bake for 27–32 minutes, or until the center reaches about 200–205°F and a toothpick inserted in the middle comes out with a few moist crumbs.
Allow the bars to cool completely in the pan before frosting.
To make the frosting, beat the cream cheese and butter together until smooth and fluffy. Add the powdered sugar gradually until the frosting reaches your desired thickness. Mix in the vanilla and a small pinch of salt.
Spread the frosting evenly over the cooled bars. If desired, top with chopped pecans or walnuts, decorate with small piped frosting carrots (see decorating note below), or simply leave the bars plain with the cream cheese frosting. Slice into bars and serve.
Notes
Use freshly shredded carrots for the best texture. Shred the carrots using the small holes of a box grater so they blend smoothly into the bars.After grating the carrots, lightly blot them with a paper towel to remove a little excess moisture before adding them to the batter.Use recent sourdough discard. If your discard is very thin or liquidy, you may need to add 1–2 tablespoons of additional flour.Carrot bars can appear done before the center is fully baked. Checking for an internal temperature around 200–205°F helps ensure the center sets properly.If you prefer a more pronounced spice flavor, you can increase the cinnamon slightly to 3 or 3 1/2 teaspoons.Optional nuts can be added to the batter or sprinkled on top of the frosting for garnish.For the cleanest slices, chill the frosted bars for 30–45 minutes before cutting.How to Store: Because of the cream cheese frosting, store the bars covered in the refrigerator for up to 4 days. For best texture and flavor, allow the bars to sit at room temperature for about 15–20 minutes before serving.How to Freeze: The unfrosted bars freeze very well. Wrap them tightly (or put in an airtight container) and freeze for up to 2 months. Thaw overnight in the refrigerator and frost before serving. Frosted bars can also be frozen, though the frosting may soften slightly after thawing.How to Decorate: For decorative frosting carrots, reserve a small portion of the frosting and tint it with orange and green food coloring. Place the frosting in a disposable piping bag and snip a very small opening at the tip.Pipe small carrot shapes directly onto the frosted bars. This simple method works well without needing specialty piping tips.If you plan to decorate several bars with piped carrots, consider increasing the frosting recipe by 1½ times so you have enough frosting for both spreading and decorating.