Baked Ricotta Pesto Pasta combines bright basil pesto with a creamy lemon-and-thyme ricotta, topped with gooey mozzarella and baked until bubbly. Fresh cherry tomatoes and baby spinach add color and texture, making this an easy, flavorful pasta bake.

Ricotta pesto pasta pairs silky ricotta with herbaceous basil pesto for a comforting, fresh-tasting casserole. This version adds halved cherry tomatoes and wilted baby spinach for pops of sweetness and color. The recipe is flexible: make the pesto from scratch or use a high-quality store-bought version for convenience. The result is a make-ahead friendly dish that reheats beautifully and feeds a crowd.
Ingredients that matter
The dish is built from three main components: pesto, a lemon-herb ricotta, and the pasta with vegetables. Key ingredients to focus on:

- Pesto. Either homemade or store-bought. Homemade pesto uses basil, Parmesan, garlic, lemon juice, nuts (slivered almonds or pine nuts), olive oil, salt and pepper. For brighter color, briefly blanch basil and shock in ice water before blending.
- Ricotta Cheese. Choose full-fat or part-skim ricotta for a creamy texture.
- Pasta. Any shape that holds sauce works well—shells, penne, rigatoni, or lumache (snail-shaped) all perform nicely.
- Baby Spinach. About 5 ounces is ideal; wilted and well-drained so it doesn’t dilute the dish.
- Mozzarella Cheese. Shredded part-skim mozzarella creates a melty golden topping.
- Thyme. Fresh thyme adds a subtle savory note to the ricotta.
- Tomatoes. Cherry or grape tomatoes, halved, provide bursts of sweetness.
See the recipe card below for exact quantities.
How to make ricotta pesto pasta bake
This bake comes together in three steps: make the pesto, mix the ricotta, and cook/assemble the pasta with vegetables before baking.

Make the pesto first. In a food processor or blender, pulse basil (well-rinsed and dried), nuts, grated Parmesan, garlic, lemon juice, salt and pepper until chopped. With the machine running, slowly drizzle in olive oil until smooth. Taste and adjust seasoning. Pesto keeps 3–4 days refrigerated; press a thin layer of olive oil on top or cover with plastic wrap to minimize discoloration.

Whisk the ricotta with lemon zest and juice, chopped fresh thyme, grated Parmesan, salt and pepper until smooth. This bright ricotta balances the herb-forward pesto and becomes pockets of creamy richness when baked.

Bring a large pot of salted water to a rolling boil. If you have a steamer insert, wilt the baby spinach in the boiling water for about 2 minutes, then cool and squeeze dry. Alternatively, add the spinach to the pasta pot for the last two minutes of cooking or microwave it briefly and drain thoroughly.

Cook the pasta until just barely al dente, drain, and let cool slightly so it can be mixed without becoming gummy.

Preheat the oven to 350°F and spray a 9×13-inch baking dish with cooking spray. Toss the pasta with about 1¼ cups of pesto until evenly coated.

Layer halved cherry tomatoes and the drained spinach over the pesto-coated pasta, pressing some of the vegetables into the mixture so they nestle throughout the dish.

Dot spoonfuls of the ricotta mixture across the top rather than spreading it evenly—these pockets of ricotta melt into creamy bites. Finish with a generous sprinkle of shredded mozzarella.

Bake uncovered for about 30–35 minutes, until the edges bubble and the top is lightly browned. For a moister result, bake covered with foil for 25 minutes, then remove foil and bake another 5–10 minutes to brown. Let rest 5 minutes before serving.
Tip: Use refrigerated pesto from the deli case when possible for better color and fresher flavor than shelf-stable jarred varieties. You’ll need about 1¼ cups (an 8-ounce jar plus a little extra oil or water if necessary).
Substitutions
This recipe adapts easily to dietary needs or ingredient swaps:
- Gluten-free: Use gluten-free pasta and undercook slightly to avoid gumminess.
- Ricotta: Whole-milk or part-skim ricotta both work; cottage cheese can be used as a substitute if preferred.
- Tomatoes: Swap canned diced tomatoes (15 oz) if fresh cherry tomatoes aren’t available.
- Spinach: Use thawed and well-drained frozen spinach, or microwave fresh spinach to wilt it quickly.
- Pasta shape: Penne, rigatoni, farfalle, or shells all hold sauce well and can be used interchangeably.

Other stir-ins to try
Add protein or vegetables to change the dish up:
- Shredded cooked chicken
- Cooked shrimp
- Sautéed zucchini or yellow squash
- Jarred roasted red peppers or artichoke hearts
- Chopped olives, canned white beans (rinsed), or sun-dried tomatoes
Equipment
A food processor or high-speed blender makes quick work of pesto. A mortar and pestle also works if you prefer to hand-grind the ingredients. A 9×13-inch baking dish is ideal for the casserole.

Make-ahead instructions
This recipe is very forgiving for advance prep:
- Make pesto and ricotta mixture up to 3–4 days ahead; ricotta may release some liquid—stir it back in before using.
- Cook and store the spinach or pasta up to 3–4 days ahead in airtight containers.
- Assemble the casserole up to 24 hours in advance, cover, and refrigerate. Bring to room temperature while the oven preheats, then bake as directed.
Storage
Leftovers keep in an airtight container in the refrigerator for 3–4 days or in the freezer for up to one month. Reheat in a 350°F oven until warmed through (about 15–20 minutes) or microwave individual portions. Transfer leftovers out of a hot baking dish for faster cooling and safer storage.
Adam’s pro tip
Cover the casserole with foil for a moister result; remove the foil for the last 5–10 minutes to encourage browning on top.

FAQ
Yes. Ricotta adds a mild, creamy balance that complements the bright herb flavor of basil pesto.
Choose a pasta that holds sauce well—penne, rigatoni, farfalle or shells are ideal.
Cover it tightly to limit oxygen exposure. Press a thin layer of olive oil over the surface or place plastic wrap directly on the pesto. Refrigerate up to 3–4 days.
More pasta recipes
If you enjoy this bake, try other pasta recipes that balance fresh ingredients with simple techniques.
Sides
Pair this dish with light sides such as a simple green salad, roasted vegetables, or crusty bread to mop up the sauce.
Recipe
Baked Ricotta Pesto Pasta
- Author: Adam Dolge
- Total Time: 1 hour
- Yield: Serves 6–8
Description
Baked Ricotta Pesto Pasta is a bright, comforting casserole that pairs fresh basil pesto with lemony ricotta, mozzarella, cherry tomatoes and spinach for a simple, crowd-pleasing meal.
Ingredients
Pesto
- 2 cups lightly packed fresh basil (about 2 oz)
- ½ cup grated Parmesan
- ¼ cup slivered almonds or pine nuts
- 2 garlic cloves
- 1 Tbsp lemon juice
- ¼ tsp salt and a pinch of black pepper
- ¾ cup olive oil (or ½ cup oil + up to ½ cup water for a lighter version)
Ricotta
- 1 cup ricotta cheese (part-skim or whole)
- ¼ cup grated Parmesan
- 1 Tbsp lemon juice and zest of 1 lemon
- 1½ tsp fresh thyme leaves, chopped
- Salt and pepper to taste
Pasta
- 5 oz baby spinach
- 1 lb pasta (lumache, penne, rigatoni, or similar)
- 1¼ cups prepared pesto
- 2 cups cherry tomatoes, halved
- 1½ cups shredded part-skim mozzarella
Instructions
Pesto
- In a food processor, pulse the basil, Parmesan, nuts, garlic, lemon juice, salt and pepper until chopped. With the motor running, drizzle in the olive oil until smooth. Adjust seasoning. Makes about 1¼ cups. Store refrigerated up to 3–4 days.
Ricotta
- Mix ricotta, Parmesan, lemon juice, lemon zest, thyme, salt and pepper in a bowl until smooth. Refrigerate up to 3–4 days if making ahead.
Pasta
- Preheat oven to 350°F and spray a 9×13-inch baking dish. Bring a large pot of salted water to a boil.
- Wilt the spinach by steaming for 2 minutes, microwaving briefly, or adding it to the pasta pot for the last two minutes of cooking. Drain well and squeeze out excess liquid.
- Cook the pasta until just barely al dente, drain and cool slightly.
- Toss the pasta with 1¼ cups pesto in the prepared dish. Top evenly with halved cherry tomatoes and the drained spinach, pressing some into the pasta. Dollop the ricotta mixture across the top and sprinkle with mozzarella.
- Bake uncovered 30–35 minutes until bubbly and lightly browned. For a moister result, bake covered 25 minutes, then uncover and bake another 5–10 minutes to brown. Cool 5 minutes before serving.
Notes
- If using store-bought pesto, seek refrigerated varieties and add a touch of oil or water if needed to reach 1¼ cups.
- Substitute slivered almonds, pecans, or walnuts for pine nuts to save cost.
- Frozen spinach can be used—thaw and squeeze dry before adding.
- Assemble the casserole and refrigerate up to 24 hours before baking if desired.
- Store leftovers in an airtight container for 3–4 days or freeze up to one month.
- Prep Time: 25 minutes
- Cook Time: 35 minutes
- Category: Pasta
- Method: Baking
- Cuisine: American/Italian