The panko is the first thing I watch: it should turn golden while the sauce bubbles around the edges of the dish. If the topping browns before the cod is cooked through, the fish pieces may be too large or uneven. Cutting the cod into 1-inch chunks helps the pieces cook at a similar pace in this cod au gratin.
I make the cheese sauce on the stove before it goes over the fish. That gives the flour time to thicken the milk before the cod releases moisture in the oven, so the finished sauce stays creamy rather than thin. Dijon adds a little savory sharpness without making the dish taste like mustard.
The topping is just panko tossed with olive oil, but coating the crumbs evenly helps them brown across the surface. After baking, I let the dish rest for five minutes; the sauce settles slightly, making it easier to serve generous portions of flaky cod under a crisp, cheesy blanket.

Kitchen Note
Give the gratin its full five-minute rest before serving. The sauce is bubbling hot when it comes out, and that short pause helps it settle around the cod instead of running straight across the plate.
Save this cod au gratin for a cozy dinner: flaky cod, creamy cheddar sauce, and a crisp panko top.
Why the Sauce Needs to Thicken Before It Meets the Cod
Cod gives off moisture as it cooks, and the sauce has to be ready for that. If the milk mixture goes into the baking dish before it has thickened, it has little time to become creamy in the oven; the fish is cooking at the same time, and its juices can leave the finished gratin looser than you want.
Cooking the flour and butter together first gives the sauce its structure. Then the milk goes in gradually, which lets it blend into the roux instead of forming floury lumps. Once the sauce coats a spoon, it can cover the raw cod evenly and finish cooking alongside it. The cheddar melts into that thickened base after the pan comes off the heat, so it blends in smoothly rather than sitting over direct burner heat.
This order also keeps the fish from being handled more than necessary. The cod goes into the baking dish raw, gets covered with sauce, and cooks through in the oven. That means fewer pans and a single, even layer where the top can brown while the sauce bubbles underneath.
What the Cod, Cheddar, and Panko Each Bring

- Cod — Choose fillets that smell clean and mild, with firm flesh that holds together as you cut it into chunks. Fresh or thawed cod both work; if it is wet, blot it dry before cutting so extra surface water doesn’t thin the sauce.
- Butter, flour, and whole milk — Together these make the thick, smooth base that carries the cheese. Whole milk gives the sauce a fuller texture; lower-fat milk can make it less rich. The butter doesn’t need to be a specialty brand, but measure the flour carefully because too much can leave the sauce pasty.
- Dijon mustard and sharp cheddar — Dijon adds a quiet tang that keeps the cheese sauce from tasting flat. Sharp cheddar gives the sauce a more pronounced cheese flavor than mild cheddar. A block you shred yourself melts especially smoothly; pre-shredded cheddar is convenient, though its coating can make the sauce a little less silky.
- Panko and olive oil — Panko makes a light, crisp top with larger, airier crumbs than standard breadcrumbs. Tossing it with olive oil helps it brown; use plain breadcrumbs if that’s what you have, but expect a finer, denser crust. No special olive oil is needed here.
Build the Sauce First, Then Let the Oven Finish the Fish
Set Up the Cod in Its Baking Dish
Heat the oven to 375°F and lightly grease a 2-quart baking dish. Cut the cod into 1-inch chunks and arrange them in an even layer so the pieces cook at roughly the same pace. Avoid piling the fish into a mound; crowded pieces are harder to cover evenly. Keep the dish nearby while you make the sauce.
Cook the Roux Until It Smells Toasty
Melt the butter in a medium saucepan over medium heat, then whisk in the flour. Cook the mixture for one minute, whisking so no dry flour remains at the edges. It should look like a smooth paste and smell gently buttery, not browned. If it starts taking on color, lower the heat so the sauce stays pale and mild.
Whisk in the Milk and Melt the Cheddar
Pour the milk in gradually while whisking, then keep stirring as the sauce cooks for 3 to 5 minutes. It will go from thin and milky to thicker and glossy; look for a sauce that coats a spoon rather than running off like milk. Take the saucepan off the heat before stirring in the Dijon, salt, pepper, and cheddar. Keep stirring until the cheese disappears into a smooth sauce.
Coat the Panko Before It Goes on Top
Toss the panko and olive oil in a small bowl until the crumbs are evenly coated. Dry patches won’t brown as readily, so break up any clumps with your fingers or a fork. Pour the cheese sauce evenly over the cod, covering the pieces, then scatter the panko across the top. A loose, even layer gives the crumbs room to crisp.
Bake Until the Crumbs Are Golden
Bake for 20 to 25 minutes, watching for a golden topping and sauce bubbling around the edges. Check the thickest piece of cod with an instant-read thermometer: it should reach 145°F and flake easily. If the crumbs are golden before the fish is ready, loosely cover the top with foil for the remaining baking time. Let the dish rest for five minutes before serving.
Easy Ways to Change the Cheese or Make It Gluten-Free
Use haddock for a similar mild fish
Swap in haddock cut into the same-size chunks. It has a similarly mild taste and works well under the cheddar sauce; check the thickest piece for doneness rather than relying only on the clock, since fillet thickness can vary.
Make a gluten-free gratin
Use a gluten-free 1-to-1 flour blend in place of the all-purpose flour and gluten-free panko for the topping. The sauce may have a slightly different texture depending on the blend, but the buttery roux method still gives it body.
Trade sharp cheddar for Gruyère
Use shredded Gruyère in place of the cheddar for a nuttier, less tangy cheese sauce. It melts well into the warm base, though the finished gratin will taste more savory and less distinctly sharp.
Storage and Reheating
- Refrigerator: Refrigerate leftovers in a covered container within 2 hours and eat them within 3 to 4 days. The panko softens as it sits against the sauce.
- Freezer: Freezing isn’t my first choice for this gratin. The cheese sauce can turn grainy after thawing, and the cod may become softer.
- Reheating: Warm individual portions in the microwave in short bursts, or cover the baking dish and reheat in a 350°F oven until hot throughout. Uncover near the end if you want to bring back some crispness; avoid reheating uncovered for the whole time, which can dry out the fish.
Questions That Come Up When Making Cod au Gratin

Cod au Gratin
Ingredients
Equipment
Method
- Heat the oven to 375°F and lightly grease a 2-quart baking dish.
- Arrange the cod in an even layer in the prepared dish.
- Melt the butter in a medium saucepan over medium heat, whisk in the flour, and cook for 1 minute.
- Gradually whisk in the milk and cook, stirring, until the sauce thickens, 3 to 5 minutes.
- Remove the sauce from the heat and stir in the mustard, salt, pepper, and cheddar until smooth.
- Toss the panko with the olive oil in a small bowl until evenly coated.
- Pour the cheese sauce evenly over the cod and sprinkle the panko mixture on top.
- Bake for 20 to 25 minutes, until the topping is golden, the sauce is bubbling, and the thickest piece of cod reaches 145°F and flakes easily.
- Let rest for 5 minutes before serving.


