Baked spaghetti with ricotta is the kind of dish that feels like a warm hug from an old friend. It’s simple comfort food made special by golden, bubbly cheese and a touch of fresh basil.
This recipe is all about easy layers of tender pasta, creamy ricotta, and rich tomato sauce that come together in the oven. Perfect for sharing, or keeping all to yourself—no judgment.

Ingredients
Here’s everything you’ll need for a cozy, cheesy baked spaghetti that feels like a warm hug straight from the Italian kitchen. This dish brings together creamy ricotta, rich tomato sauce, and just the right touch of fresh herbs to make your dinner shine without fuss.
- 12 ounces spaghetti
- 2 cups ricotta cheese
- 2 cups marinara sauce
- 1 cup shredded mozzarella cheese
- 1/2 cup grated Parmesan cheese
- 1/4 cup fresh basil, sliced
- 2 cloves garlic, minced
- 2 tablespoons olive oil
- 1 teaspoon dried oregano
- Salt, to taste
- Black pepper, to taste

Instructions
Nothing beats cozying up with this baked spaghetti that’s creamy, saucy, and flecked with fresh basil. Here, every bite is a perfect balance of ricotta’s softness, gooey mozzarella, and a golden, bubbly top that’s just waiting to be shared with good company.
- Preheat the oven: Set your oven to 375°F (190°C) so it’s ready when your pasta is mixed and waiting.
- Boil the spaghetti: Bring a large pot of salted water to a boil, then add the spaghetti and cook until just al dente—usually about 8 minutes—drain and set aside.
- Sauté the garlic: Warm the olive oil in a pan over medium heat, add the minced garlic, and cook gently until fragrant but not browned, about 1 minute.
- Mix spaghetti and sauce: In a large bowl, combine the cooked spaghetti with the marinara sauce, dried oregano, salt, and pepper to taste, stirring gently to coat every strand.
- Layer the cheese mixture: In a separate bowl, stir together the ricotta cheese, half of the grated Parmesan, and half of the sliced basil, seasoning lightly with salt and pepper.
- Assemble the casserole: Spread half of the sauced spaghetti in a baking dish, dot evenly with half the ricotta mixture, then repeat with the remaining spaghetti and ricotta layers.
- Add the mozzarella topping: Sprinkle the shredded mozzarella and the remaining Parmesan cheese evenly over the top layer for that irresistible golden crust.
- Bake until bubbly: Place the dish in the oven and bake for 25-30 minutes or until the cheese is melted and spots are nicely browned.
- Garnish and serve: Let the baked spaghetti rest a few minutes before scattering the remaining fresh basil on top, then serve warm with a smile.
How to Store Baked Spaghetti With Ricotta
Once cooled, cover any leftovers tightly with foil or transfer to an airtight container and store in the refrigerator for up to 3 days. To reheat, pop it in a warm oven at 350°F (175°C) until heated through, or microwave individual portions, adding a splash of water to keep it moist. This dish also freezes well—just thaw overnight in the fridge before reheating for a comforting meal anytime.
Tweaks and Additions
This baked spaghetti is a cozy classic ready to welcome your own little twists. Whether you want to boost the flavors, add a touch of freshness, or invite a bit more texture, here are some friendly tweaks and extras to make this dish truly yours without fuss or fancy steps.
- Add Red Pepper Flakes: Toss in a pinch of red pepper flakes when sautéing the garlic to give the sauce a gentle kick that warms without overpowering.
- Swap Dried Oregano for Fresh Rosemary: If you have fresh rosemary on hand, chop a little and stir it into the sauce instead of dried oregano for a piney, fragrant note that complements the cheese beautifully.
- Include Sautéed Mushrooms: Add some sliced mushrooms to the garlic and olive oil step—soften them until golden for an earthy touch and a bit more umami.
- Use Part-Skim Mozzarella: To keep the dish lighter but still melty, swap full-fat mozzarella for part-skim; you’ll still get a beautiful golden crust without feeling weighed down.
- Mix in Fresh Spinach: Stir a few handfuls of fresh spinach into the spaghetti and sauce mixture before layering— the heat will gently wilt it, adding color and a mild, fresh flavor.
- Try Lemon Zest in the Ricotta: Grate a little lemon zest into the ricotta mixture to brighten the creamy layers with a subtle zing that surprises and delights.
- Replace Half the Marinara with Roasted Red Pepper Sauce: For a sweeter, smoky twist, mix some roasted red pepper sauce into your marinara — it pairs nicely with the basil and cheeses.
- Top with Toasted Pine Nuts: Just before serving, sprinkle toasted pine nuts over the baked spaghetti for a delightful crunch and a buttery, nutty finish.
