Thin slices of zucchini and yellow squash turn soft and silky under cream, then finish with a bubbling, deeply browned top that crackles when you spoon into it. The vegetables keep their shape just enough to give each bite some structure, while the gruyère and panko add a salty, nutty crust that makes this feel like more than a simple baked side dish.
What makes this gratin work is the balance between moisture and heat. Zucchini and yellow squash release a lot of liquid, so the cream and broth need enough body to coat the layers without turning the dish soupy. Baking it covered first lets the vegetables soften evenly, then uncovering it gives the top time to brown before the center dries out. I also cook the onion down before it goes in, which keeps it sweet instead of sharp.
Below you’ll find the small details that matter most here: how thin to slice the squash, why the breadcrumb topping stays crisp, and the swaps that still give you a proper gratin when you need to work with what you have.
The squash stayed tender without turning watery, and the top baked up with that crunchy, cheesy crust I was hoping for. I made it with the yellow squash from my garden and it was gone fast.
Save this zucchini gratin with yellow squash for the nights when you want a creamy vegetable side with a crisp gruyère-panko crust.
The Gratin Falls Apart When the Vegetables Dump Too Much Water
The biggest mistake with a squash gratin is treating zucchini like a dry vegetable. It isn’t. Once it heats up, it starts giving off moisture fast, and if you pile it into the dish raw with no plan, the cream can thin out and the topping can go soggy before the center is done.
This version handles that problem by building flavor in layers. The onion cooks first so it softens and sweetens, the squash goes in raw but in a tight overlap so it bakes into a neat structure, and the cream-broth mixture gets seasoned before it hits the pan. Covered baking does the gentle work, then the final uncovered stretch gives the top time to brown while the liquid reduces underneath.
What the Gruyère, Cream, and Breadcrumbs Each Bring to the Pan

- Zucchini and yellow squash — Use both if you can. The mix gives you a nicer color contrast and a slightly better texture than using only one squash. Slice them thin and evenly so they cook at the same rate; thick slices stay firm while the rest turns soft.
- Gruyère — This is the backbone of the flavor on top and just under the crust. It melts smoothly and brings that nutty, savory edge a milder cheese can’t match. Swiss works in a pinch, but the flavor will be softer.
- Heavy cream and broth — The cream gives richness, while the broth loosens it just enough to seep between the layers without becoming heavy. Chicken broth adds a little more depth, but vegetable broth keeps the dish fully vegetarian and still tastes balanced.
- Panko and parmesan — Panko stays lighter and crunchier than regular breadcrumbs, which matters because the vegetables underneath are already soft. Parmesan adds salt and sharpness, so don’t overdo the salt earlier if your cheese is very salty.
- Fresh thyme — Dried thyme can work, but use less of it because it reads stronger once baked. Fresh thyme keeps the dish from tasting flat and gives the cream a clean, herbal note.
How to Layer the Squash So the Center Bakes Through
Soften the Onion First
Cook the onion in butter until it turns translucent and sweet, not browned. If it takes on color too fast, lower the heat and give it another minute; raw onion will stay sharp inside the gratin and fight with the cream. The garlic only needs about 30 seconds, just long enough to smell fragrant. Any longer and it can burn before the dish even reaches the oven.
Build Neat Layers in the Dish
Arrange the zucchini and yellow squash in overlapping rows so they look like shingles. That isn’t just for looks; it helps the vegetables cook evenly and gives the gratin enough structure to scoop cleanly. Keep the slices thin and similar in size, because wide variations make the soft pieces collapse before the firmer ones are tender.
Let the Oven Do the Moisture Control
Cover the dish for the first 25 minutes so the vegetables steam gently and start to soften. Then remove the foil and bake until the top turns golden and the edges bubble, which tells you the liquid has reduced enough to support the crust. If it still looks pale and loose in the center, give it a few more minutes uncovered; pulling it too early is how you end up with a runny gratin.
Ways to Bend This Gratin Without Ruining the Texture
Make it vegetarian
Use vegetable broth instead of chicken broth and the dish stays fully vegetarian without changing the texture. The flavor will be a touch lighter, so the thyme and cheese matter a little more.
Make it gluten-free
Swap the panko for a gluten-free breadcrumb blend that browns well, or crush gluten-free crackers for a richer crust. Don’t skip the butter in the topping, because that’s what helps the crumbs toast instead of staying dusty.
Add more body for a main-dish side
Tuck a thin layer of cooked rice, sautéed mushrooms, or wilted spinach beneath the squash if you want something heartier. Keep the add-ins cooked and drained first, or they’ll release extra moisture and soften the crust.
Use Swiss instead of Gruyère
Swiss melts well and gives you a similar creamy finish, but it tastes milder and a little less nutty. If that’s what you have, use it, and lean on the parmesan in the topping to bring back some sharpness.
Storage and Reheating
- Refrigerator: Store leftovers covered for up to 3 days. The topping softens, but the flavor holds up well.
- Freezer: It freezes, but the squash gets softer after thawing, so I only freeze it if texture matters less than convenience. Wrap tightly and thaw overnight in the fridge before reheating.
- Reheating: Reheat uncovered in a 350°F oven until hot and the top re-crisps, about 15 to 20 minutes. The mistake to avoid is the microwave, which turns the squash watery and kills the crust.
Questions I Get Asked About This Recipe

Zucchini Gratin with Yellow Squash
Ingredients
Equipment
Method
- Preheat the oven to 375°F and grease a 9x13 baking dish.
- Sauté the onion in the butter over medium heat for 4 minutes, until softened.
- Add the garlic and fresh thyme and cook for 30 seconds, just until fragrant, then remove from heat.
- Layer the zucchini and yellow squash slices in the baking dish in overlapping rows, alternating colors.
- Scatter the sautéed onion and garlic evenly over the top.
- Whisk the heavy cream, broth, salt, and black pepper, then pour evenly over the vegetables.
- Sprinkle 3/4 cup of the shredded gruyère over the top.
- Mix the remaining gruyère, parmesan, and panko with the melted butter, then scatter over everything.
- Cover with foil and bake for 25 minutes at 375°F, until the vegetables are tender and bubbling around the edges.
- Uncover and bake 15–20 more minutes at 375°F until golden and bubbling.