Spaghetti Squash Gratin

A golden cradle of molten cheese and threadlike squash, this gratin sings of late autumn kitchens—warm butter, nutmeg whispering through steam, and a browned, crackling crown that gives way to silk beneath.

Why make this recipe
There is something almost alchemical in coaxing a dense, humble squash into delicate strands and then binding them with a creamy, nutmeg-kissed sauce. This gratin turns modest produce into a dinner-party centerpiece or a quiet, nourishing reward at the end of a day. It is comforting without heaviness—refined in its restraint, generous in its flavor.

How to make Spaghetti Squash Gratin

Ingredients:

  • 1 large spaghetti squash (about 3-4 pounds)
  • 4 tablespoons unsalted butter, divided
  • 1 medium yellow onion, finely chopped
  • 2 cloves garlic, minced
  • 4 tablespoons all-purpose flour
  • 3 cups whole milk
  • 1/2 teaspoon salt, plus more to taste
  • 1/4 teaspoon black pepper, plus more to taste
  • 1/4 teaspoon nutmeg
  • 1 cup grated Gruyere cheese, divided
  • 1 cup grated sharp cheddar cheese, divided
  • 1/2 cup grated Parmesan cheese, divided
  • 1/4 cup panko breadcrumbs
  • 2 tablespoons chopped fresh parsley, for garnish (optional)

Directions:

  1. Preheat oven to 400°F (200°C). Halve the spaghetti squash lengthwise and use a spoon to scoop out the seeds and fibrous bits. Brush or drizzle the cut sides with 2 tablespoons melted butter and season lightly with salt and pepper.
  2. Place the halves cut-side down on a parchment-lined baking sheet and roast for 45–60 minutes, until the flesh yields easily to a fork. Remove and let cool slightly, then use a fork to shred the flesh into long, glossy strands.
  3. Meanwhile, in a large saucepan over medium heat, melt the remaining 2 tablespoons of butter. Add the finely chopped onion and minced garlic, cooking gently until the onion is soft and translucent but not browned—about 6–8 minutes.
  4. Sprinkle in the flour to form a roux, stirring constantly for 1–2 minutes to cook the raw flour taste away. Gradually whisk in the milk, smoothing out any lumps and bringing the mixture to a gentle simmer.
  5. Cook, stirring, until the sauce thickens enough to coat the back of a spoon. Season with 1/2 teaspoon salt, 1/4 teaspoon black pepper, and the nutmeg, tasting and adjusting as needed.
  6. Stir in 3/4 cup of Gruyere, 3/4 cup of cheddar, and 1/4 cup of Parmesan until the cheeses melt into the sauce, which will become silkier and slightly glossy.
  7. Fold the shredded spaghetti squash into the cheese sauce until evenly coated. Transfer the mixture into a greased baking dish, smoothing the top.
  8. Combine the remaining cheeses (1/4 cup Gruyere, 1/4 cup cheddar, 1/4 cup Parmesan) with the panko breadcrumbs, scattering this mixture evenly over the gratin to form a crisp, golden crust.
  9. Bake for 20–25 minutes, until the topping is deeply golden and the edges bubble gently. Let the gratin rest for 5–10 minutes before serving. Garnish with chopped parsley if desired and serve hot.

How to serve Spaghetti Squash Gratin
Allow the gratin a short, patient rest so the sauce settles—this makes slicing and serving cleaner and preserves the layers of texture. Present it alongside a bright green salad dressed with lemon and olive oil, or as a rich accompaniment to roasted poultry or a simple pan-seared fish. Spoon portions with care so each helping carries both creamy strands and crunchy topping.

How to store Spaghetti Squash Gratin
Cool the gratin to room temperature, then cover tightly and refrigerate for up to 3 days. To reheat, warm individual portions in a 350°F (175°C) oven for 10–15 minutes until heated through and the topping regains some crispness; a quick broil for 1–2 minutes can revive the crust, watching closely so it does not burn.

Tips to make Spaghetti Squash Gratin

  • Choose a firm, heavy squash with a hard rind and no soft spots; the denser the flesh, the longer, more distinct the strands will be.
  • Roast cut-side down to concentrate steam and yield tender, ribbon-like strands without drying.
  • Cook the roux slowly and whisk in cold milk gradually to prevent lumps—patience here rewards you with an utterly smooth sauce.
  • Taste and adjust seasoning at the end; cheese saltiness can vary, so add a final pinch only after the cheeses are incorporated.
  • For an even crispier topping, mix a teaspoon of melted butter into the panko before scattering it over the gratin.

Variations (if any)

  • Herb-laced: Fold in a tablespoon of chopped fresh thyme or basil into the sauce for an herbal lift.
  • Mushroom & shallot: Sauté sliced mushrooms and shallots with the onion for an earthier, more rustic gratin.
  • Lighter version: Substitute 2% milk and reduce cheese quantities slightly; add a tablespoon of Dijon mustard to lend depth.
  • Make it spicy: A pinch of red pepper flakes in the sauce or a dusting of smoked paprika on the crust adds a subtle warmth.

FAQs
Q: Can I prepare this gratin ahead of time?
A: Yes—assemble the gratin, cover, and refrigerate for up to 24 hours before baking. Add a few extra minutes to the bake time if it goes into the oven chilled.

Q: Can I use store-bought shredded cheese?
A: You can, but freshly grated cheese melts more smoothly and gives a cleaner texture. Pre-shredded cheeses often contain anti-caking agents that can affect melt.

Q: Is there a way to make the dish gluten-free?
A: Substitute a gluten-free flour for the roux and use gluten-free breadcrumbs or crushed toasted nuts for the topping.

Q: How can I increase the depth of flavor in the sauce?
A: A splash (1–2 teaspoons) of dry white wine added after the roux cooks and reduced slightly before adding milk, or a teaspoon of Dijon mustard, will add complexity without overwhelming the dish.

Q: Can I bake the squash whole instead of halving it?
A: Yes—baking whole takes longer (often 60–90 minutes) but concentrates flavor; pierce the rind and roast until tender, then halve and remove seeds before shredding.

Conclusion

If you would like an alternate take or inspiration from other kitchens, consider the warm, homey version at Spaghetti Squash Gratin — The Buttered Home, or a brighter, herb-forward variant at Spaghetti Squash Gratin With Basil — NYT Cooking.

There is a particular pleasure in waiting—watching squash soften, sauce thicken, crust caramelize—and in that gentle patience the simple alchemy of baking quietly unfolds.

Delicious Spaghetti Squash Gratin baked with cheese and herbs

Spaghetti Squash Gratin

A comforting gratin featuring delicate strands of spaghetti squash bound in a creamy, nutmeg-kissed cheese sauce, topped with a crisp, golden crust.
Prep Time 20 minutes
Cook Time 1 hour 25 minutes
Total Time 1 hour 45 minutes
Servings: 6 servings
Course: Main Course, Side Dish
Cuisine: American, Vegetarian
Calories: 400

Ingredients
  

Main Ingredients
  • 1 large spaghetti squash (about 3-4 pounds) Choose a firm, heavy squash with a hard rind.
  • 4 tablespoons unsalted butter, divided 2 tablespoons for roasting squash, 2 tablespoons for sauce.
  • 1 medium yellow onion, finely chopped
  • 2 cloves garlic, minced
  • 4 tablespoons all-purpose flour For roux.
  • 3 cups whole milk Can substitute with 2% for a lighter version.
  • 1/2 teaspoon salt, plus more to taste Adjust seasoning at the end.
  • 1/4 teaspoon black pepper, plus more to taste
  • 1/4 teaspoon nutmeg Adds warmth to the sauce.
  • 1 cup grated Gruyere cheese, divided 3/4 cup for sauce, 1/4 cup for topping.
  • 1 cup grated sharp cheddar cheese, divided 3/4 cup for sauce, 1/4 cup for topping.
  • 1/2 cup grated Parmesan cheese, divided 1/4 cup for sauce, 1/4 cup for topping.
  • 1/4 cup panko breadcrumbs For a crispy topping.
  • 2 tablespoons chopped fresh parsley, for garnish (optional) Adds freshness.

Method
 

Preparation
  1. Preheat oven to 400°F (200°C). Halve spaghetti squash lengthwise and scoop out seeds.
  2. Brush cut sides with 2 tablespoons melted butter and season with salt and pepper.
  3. Place halves cut-side down on a parchment-lined baking sheet and roast for 45–60 minutes until flesh yields easily to a fork.
  4. Remove and let cool slightly, then shred flesh into long strands with a fork.
Sauce Preparation
  1. In a large saucepan over medium heat, melt the remaining 2 tablespoons of butter.
  2. Add onion and garlic, cooking gently until onion is soft and translucent—about 6–8 minutes.
  3. Sprinkle flour to form a roux, stirring constantly for 1–2 minutes to cook raw flour taste out.
  4. Gradually whisk in milk, smoothing out lumps and bringing mixture to a gentle simmer.
  5. Cook, stirring, until sauce thickens enough to coat the back of a spoon. Season with salt, black pepper, and nutmeg.
  6. Stir in 3/4 cup of Gruyere, cheddar, and 1/4 cup of Parmesan until melted.
Assembly and Baking
  1. Fold shredded squash into the cheese sauce until evenly coated.
  2. Transfer mixture into a greased baking dish, smoothing the top.
  3. Combine remaining cheeses with panko breadcrumbs and scatter over gratin.
  4. Bake for 20–25 minutes until topping is golden. Let rest for 5–10 minutes before serving.

Notes

For a crispier topping, mix a teaspoon of melted butter into the panko before scattering. Allow the gratin to rest before slicing for cleaner servings.