Best Cheese and Onion Pie Recipe UK

Updated November 24, 2026

Total time
1 hr 25 min
prep 35 min · cook 50 min
Serves
6
portions as written

Jump to recipe

Cheese and onion pie is a beloved British classic—a hearty, savoury pie filled with a creamy, tangy mix of melted cheese and sweet, soft onions, all encased in golden, flaky pastry. This recipe delivers the ultimate version: a rich, well-seasoned filling with a perfect balance of sharp cheddar and sweet onion, wrapped in a buttery shortcrust that holds up beautifully. It’s the kind of pie that’s equally at home as a weeknight dinner with baked beans or as the star of a pub-style lunch.

Ingredients

  • 2 tbsp (30 g) unsalted butter
  • 3 large onions (about 600 g / 1 lb 5 oz), thinly sliced
  • 1 tsp salt
  • 1/2 tsp black pepper
  • 1 tsp dried thyme (optional)
  • 2 cups (200 g) grated mature cheddar cheese
  • 1 cup (100 g) grated red Leicester or additional cheddar
  • 1 tbsp (15 g) all-purpose flour
  • 1/2 cup (120 ml) whole milk
  • 1 tsp Dijon mustard (optional)
  • 1 large egg, beaten (for egg wash)
  • For the pastry:
  • 2 1/2 cups (300 g) all-purpose flour, plus extra for rolling
  • 1/2 tsp salt
  • 3/4 cup (170 g) cold unsalted butter, cut into cubes
  • 1/4 cup (60 ml) ice-cold water (approx.)

Instructions

  1. Make the pastry: In a large bowl, mix the flour and salt. Add the cold butter cubes and rub them into the flour with your fingertips until the mixture resembles coarse breadcrumbs. (You can also use a food processor—pulse a few times.) Gradually add the ice-cold water, a tablespoon at a time, mixing with a fork until the dough just comes together. Turn out onto a lightly floured surface, knead gently for a few seconds to form a smooth disc, then wrap in plastic wrap and chill for at least 30 minutes.
  2. Cook the onions: While the pastry chills, melt the butter in a large frying pan over medium heat. Add the sliced onions, salt, pepper, and thyme if using. Cook, stirring occasionally, for 15–20 minutes until the onions are soft and golden, but not browned. Remove from heat and let cool slightly.
  3. Make the filling: In a large bowl, combine the grated cheeses and flour, tossing to coat. Add the cooked onions and mix well. If using mustard, stir it into the milk, then pour the milk into the cheese-onion mixture and stir until everything is well combined. The mixture should be moist but not soupy.
  4. Preheat the oven: Preheat your oven to 400°F (200°C). Place a baking sheet on the middle rack to preheat as well—this helps catch any drips and ensures a crisp bottom crust.
  5. Roll out the pastry: On a lightly floured surface, roll out two-thirds of the pastry into a circle about 12 inches (30 cm) in diameter and about 1/8-inch (3 mm) thick. Gently line a 9-inch (23 cm) pie dish with the pastry, pressing it into the edges. Leave any overhang for now.
  6. Fill the pie: Spoon the cheese and onion filling into the pastry-lined dish, spreading it evenly. Roll out the remaining pastry to a slightly smaller circle (about 10 inches / 25 cm) for the lid. Brush the rim of the bottom pastry with a little beaten egg, then place the lid on top. Press the edges together to seal, then crimp with your fingers or a fork. Trim any excess pastry with a knife.
  7. Finish and bake: Cut a few small slits in the top of the pie to allow steam to escape. Brush the top with the remaining beaten egg. Place the pie on the preheated baking sheet and bake for 35–40 minutes, until the pastry is golden brown and the filling is bubbling hot. If the edges brown too quickly, cover them with foil.
  8. Rest and serve: Let the pie rest for 10 minutes before slicing. This helps the filling set slightly and prevents it from running out.

Tips

  • Cheese choice: Mature cheddar is essential for flavour; you can substitute Red Leicester or a mix of cheddar and Gruyère for a different twist. Avoid pre-shredded cheese as it often contains anti-caking agents that affect melting.
  • Onion sweetness: For a sweeter filling, cook the onions slowly over low heat for 20–25 minutes until they caramelize slightly. This adds depth but takes a bit more time.
  • Pastry handling: Keep the pastry cold. If it becomes too soft to handle, chill it again for 10 minutes. Overworking the dough will make it tough.
  • Make ahead: You can assemble the pie a day in advance, cover it with plastic wrap, and refrigerate. Add 5–10 minutes to the baking time if baking from cold.

Serving Suggestions

Serve this pie warm with a side of baked beans, mushy peas, or a simple green salad. It also pairs wonderfully with chutney or pickled onions for a classic pub-style meal. For a heartier dinner, add roasted potatoes and steamed vegetables.

Variations

  • Add potato: Layer thin slices of cooked potato in the bottom of the pie before adding the cheese and onion filling for a more substantial pie.
  • Herb twist: Add 1 tablespoon of chopped fresh chives or parsley to the filling for a fresh note.
  • Puff pastry top: Use puff pastry for the lid instead of shortcrust for a lighter, flakier finish—just adjust baking time to 25–30 minutes.
  • Vegan version: Use a plant-based butter and cheese alternative that melts well, and substitute the milk with unsweetened plant milk.

Storage and Reheating

Store leftover pie in the refrigerator for up to 3 days, covered with foil or in an airtight container. To reheat, place slices in a preheated oven at 350°F (175°C) for 15–20 minutes until hot through. You can also microwave individual slices for 1–2 minutes, though the pastry will soften. The pie can be frozen (baked or unbaked) for up to 2 months; thaw overnight in the fridge before reheating or baking.

Frequently Asked Questions

Can I use pre-made pastry? Yes, store-bought shortcrust pastry works well and saves time. You’ll need about 500 g (1 lb 2 oz) for a 9-inch pie.

Why is my filling runny? This can happen if the onions release too much moisture. Make sure to cook them until soft and any liquid has evaporated. Also, the flour in the filling helps thicken it—don’t skip it.

Can I make this pie without eggs? Yes, you can omit the egg wash and brush the pastry with milk or cream instead for a golden finish. The filling itself doesn’t require eggs.

What is the best cheese for this pie? Mature cheddar is traditional and gives the strongest flavour. Mixing with Red Leicester adds colour and a slightly nutty taste.

How do I prevent the bottom crust from getting soggy? Preheating the baking sheet and baking the pie on it helps cook the bottom quickly. You can also brush the bottom pastry with a thin layer of beaten egg before adding the filling.

Can I freeze the pie? Absolutely. Freeze the unbaked pie, wrapped well, for up to 2 months. Bake from frozen at 375°F (190°C) for 50–60 minutes, covering the top with foil if it browns too fast.

Related

More recipes to cook

Safety notes: safe minimum internal temperatures from USDA FSIS; raw and undercooked fish guidance from the U.S. FDA. Food safety notes

Spotted an error? Tell us and we will correct it (corrections policy).