Curated recipes from 193 countries  •  New seasonal Mediterranean issue out now

Overview

Bacalhau à Zé do Pipo

Bacalhau a Ze do Pipo, Ze do Pipo Cod, Portuguese Cod and Potato Gratin

This bacalhau a ze do pipo recipe layers desalted cod and sweet onion under creamy mashed potato, then spreads mayonnaise over the top and bakes it until golden and bubbling. It is the rich, oven-baked cousin of the other Portuguese cod dishes — no cream, no egg scramble, just cod, potato and a crisp mayo crust. One serving is about 425 g.

Bacalhau à Zé do Pipo was created in Porto in the 1960s by José Valentim, a restaurant owner known to everyone as Zé do Pipo. He entered his baked cod, potato and mayonnaise gratin into a national gastronomic contest and won first prize, and the dish spread from Porto's restaurants to tables across Portugal, where it remains one of the country's best-loved cod recipes.

Pairs well with: A green salad and a glass of vinho verde

Provenance

Portugal flag Portugal

Porto Family Table

Mediterranean & Italy

Time Dedication

1h 20m

30m prep • 50m cook

Batch Yield

4 Servings

749 kcal per serving

1 serving ≈ 425 g

Technical Skill

Intermediate

Intermediate (Baked Gratin)

Meal Timing & Digestive Fit

Breakfast

Not Advised

Lunch

Hearty Midday Main

Dinner

Ideal Hearty Main

Snack & Tea

Inappropriate

Occasions: Family Sundays, Christmas Eve, cosy winter dinners, potluck suppers Cost: Medium — about $6–7 per serving at home
A baked bacalhau a ze do pipo gratin in a round dish, with golden mashed potato and mayonnaise topped with black olives

Porto Family Table

Photo: Fpenteado, CC BY-SA 3.0, via Wikimedia Commons

The Heritage Formulary

Measured Ingredients

Estimated cost: Medium — about $6–7 per serving at home (USD)

A traditional Porto oven dish: desalted cod and onion under mashed potato, finished with a mayonnaise crust and black olives.

Execution Methodology & Culinary Technique

Step-by-Step Cooking Guide

Active 1h 20m
P

Prep Stage: Soak, Flake & Peel

30 Mins • Soak 24 Hours Ahead

Soak the salt cod in cold water for 24 hours, changing the water 3–4 times so the salt draws out evenly. Drain it, remove skin and bones, and flake into bite-size pieces. Meanwhile peel and chunk the potatoes, slice the onion, chop the garlic and parsley, drain the olives, and measure out the milk, butter and mayonnaise.

Maestro Tip: Taste a flake after soaking: it should be pleasantly salty, not harsh. If it still stings, soak a few hours longer.

  1. 1

    Soak and Flake the Cod

    24 Hours Soaking + 10 Mins Cold water, ~20°C (68°F)

    Soak 500 g of salt cod in cold water for 24 hours, changing the water 3–4 times. Drain, pat dry, pull off the skin, pick out any bones, and flake the flesh into bite-size pieces.

    Keep the flakes chunky — they should stay visible in the finished gratin, not dissolve into the onion.

    Done when: Flakes are tender, lightly salted, and free of skin and bones.

  2. 2

    Poach the Cod and Soften the Onion

    10 Mins Gentle simmer, ~85°C (185°F); then medium heat, ~160°C (320°F)

    Simmer the flaked cod in a pan of water for 4–5 minutes until it turns opaque, then drain well. Heat the olive oil in a wide frying pan over medium heat, soften the sliced onion for 4 minutes until translucent, add the garlic for 30 seconds, then stir in the drained cod and cook for 2 minutes until fragrant. Season with pepper and spread the mixture over the base of a buttered baking dish.

    Do not brown the garlic — it turns bitter in seconds, so add it after the onion has softened.

    Done when: Cod is opaque and flakes easily; onion is soft and sweet-smelling.

  3. 3

    Boil and Mash the Potatoes

    20 Mins Boiling water, 100°C (212°F)

    Boil the potato chunks in salted water for 15–18 minutes until they break apart easily. Drain well and steam-dry for 1 minute, then mash with the butter and warm milk until smooth. Beat in the egg yolk, the nutmeg and the pepper, and taste — it should need little or no salt.

    Mash while the potatoes are still hot and the milk is warm; cold milk or a cold bowl makes the mash gluey.

    Done when: Mash is smooth, fluffy and holds a peak on the spoon.

  4. 4

    Assemble the Gratin

    10 Mins Room temperature, ~20°C (68°F)

    Spoon the mashed potato over the cod and onion in the baking dish and spread it evenly right to the edges, sealing the fish underneath. Use the back of a spoon to make gentle swirls on the surface, then spread the mayonnaise over the top in an even layer.

    Seal the mash to the edges of the dish — any gap lets the cod dry out in the oven.

    Done when: The cod layer is fully covered; the mayonnaise coats the whole surface.

  5. 5

    Bake Until Golden

    20 Mins Oven at 200°C (400°F)

    Bake at 200°C (400°F) for 18–20 minutes until the mayonnaise topping is golden brown in patches and bubbling at the edges, and the fish in the centre has reached 63°C (145°F).

    If the top colours too fast, move the dish to a lower shelf — do not cover it, or the mayonnaise will steam instead of crisping.

    Done when: Top is golden brown in patches and crisp at the swirls; the edges bubble.

  6. 6

    Rest, Garnish and Serve

    5 Mins Resting, ~20°C (68°F)

    Rest the gratin for 5 minutes so the layers settle and spoonfuls hold together. Arrange the black olives over the top, scatter over the chopped parsley, and serve straight from the dish — about 425 g per person.

    A wide spoon serves it best; a knife cuts through the soft layers.

    Done when: Spoonfuls hold their shape on the plate; the topping stays crisp.

Finishing Touches & Plating

Let the gratin rest for five minutes before serving — the layers settle as it cools slightly, and the first spoonful holds together instead of sliding apart.

Nutritional Physiology & Benefits

Nutrition

Energy

749

kcal / serving

Protein

35g

Complete AA

Carbs

38g

Complex

Fats

51g

Healthy

Per serving (4 servings · 1 serving ≈ 425 g)
Energy749 kcal
Protein35 g
Carbohydrates38 g
Fat51 g
Fibre5.1 g
Sugar4.8 g
Sodium817 mg
Per 100g
Energy176 kcal
Protein8.2 g
Carbohydrates8.8 g
Fat12 g
Fibre1.2 g
Sugar1.1 g
Sodium192 mg

Nutrition values are estimated — calculated from USDA FoodData Central values for the listed ingredients.

Vitamins & minerals: Vitamin B12 and selenium (cod), vitamin B6 and potassium (potato), vitamin D and choline (egg yolk), vitamin E (olive oil).

High-Quality Protein

Cod and egg together supply about 35 g of complete protein per serving, with all essential amino acids the body needs to build and repair muscle.

B12 and Selenium from Cod

Cod is a good source of vitamin B12 and selenium, which support normal energy metabolism and immune function.

Potassium and B6 from Potato

Potato contributes potassium and vitamin B6, and the olive oil adds monounsaturated fat.

Food Pairings

What to Eat With

To optimize nutrient absorption and elevate the sensory depth, pair with these authentic accompaniments:

Vegetables

Simple Green Salad

Crisp lettuce with a light lemon-olive oil dressing cuts through the richness of the mayonnaise and butter and adds fresh crunch.

Drinks

Vinho Verde

A chilled, lightly sparkling vinho verde has the acidity to balance the salty cod and the fat of the mayonnaise, and it is the traditional Portuguese pairing.

Sides

Crusty Bread

A slice of crusty bread is ideal for scooping up the creamy layers left on the plate.

Soups

Caldo Verde to Start

A light kale and potato soup opens the meal without filling you up before the rich gratin arrives.

Full Menus

Full Portuguese Menu

Start with caldo verde, serve the gratin with salad and bread, and finish with fresh fruit and a small coffee.

Complete menu

Start with caldo verde soup, serve the gratin with a green salad and crusty bread, and finish with fresh fruit.

Digestive Guardrails

What NOT to Combine

To prevent digestive distress, sluggishness, or palate clash, avoid pairing the dish with these elements:

Extra Salt Before Tasting

Salt cod stays salty even after soaking, and mayonnaise adds more sodium. Adding salt before tasting easily pushes the dish over-salty; always taste first. This is general information, not medical advice.

A Second Rich Sauce on the Side

The gratin is already rich from mayonnaise, butter and olive oil, so a heavy sauce adds saturated fat without improving flavour — a light salad is the better match. This is general information, not medical advice.

General information only, not medical advice — consult a doctor for personal dietary decisions.

Who Should Eat It

Who Should Eat

  • General adultsA rich, comforting dinner — best as an occasional treat, with salad on the side.
  • ChildrenSuitable from age 3+; the flavours are mild and the texture is soft, but check carefully for small cod bones.
  • ElderlySoft, easy to chew and easy to digest; keep the portion moderate because of the salt.
  • Pregnant womenGenerally suitable — the cod is fully cooked and the dish is served hot; keep the portion moderate due to sodium.
  • Breastfeeding womenGenerally suitable; the protein, B12 and calcium support recovery — drink water alongside, as the dish is salty.
  • AthletesA strong post-training meal with about 35 g protein per serving plus carbs from potato for glycogen.
  • Weight gainA good choice — take a second helping and add extra bread on the side.
  • Weight lossUse half the mayonnaise and butter, swap half the potato for cauliflower mash, and fill half the plate with salad.

Health Conditions — Adjust or Avoid

Conditions

  • DiabetesKeep the potato portion to about a third of the plate and add extra salad; the cod and mayonnaise themselves are low in carbohydrate. Ask your clinician about portion size.
  • High blood pressureSoak the cod thoroughly, use unsalted butter, and keep the portion modest — most of the sodium comes from the cod, mayonnaise and olives. Ask your clinician about portion size.
  • Kidney diseaseThis dish is high in sodium, potassium and phosphorus from cod, potato and mayonnaise; eat rarely and in a small portion, and ask your clinician first.
  • GoutEat occasionally and in smaller portions — fish is moderate in purines. Ask your clinician about frequency.
  • Stomach issuesUsually well tolerated, but go easy on the rich mayonnaise topping if your stomach is sensitive. Ask your clinician if symptoms persist.
  • Cardiovascular diseaseHigh in fat from mayonnaise, butter and olive oil — eat rarely, use less mayonnaise, and load up on salad. Ask your clinician about portion size.
  • Fatty liverKeep the portion modest, use half the mayonnaise and butter, and favour the cod over extra potato. Ask your clinician about portion size.
  • Food allergiesContains fish (cod), egg (mayonnaise, egg yolk) and milk (butter, milk). Naturally gluten-free — just confirm the mayonnaise is labelled gluten-free if you have coeliac disease.
  • Special therapeutic dietsIf you follow a prescribed low-sodium diet, soak the cod longer and use less mayonnaise and fewer olives; check with your clinician before eating.

If you have a medical condition, consult your doctor before changing your diet.

Storage & Use

Storage & Use

How to store
Cool quickly and store in an airtight container in the fridge.
In the fridge
2 days; the mayonnaise topping softens on storage.
In the freezer
Not recommended — the mayonnaise splits and the potato goes watery.
How to reheat
Warm covered in a 180°C (350°F) oven until steaming hot, 74°C (165°F); uncover for the last 5 minutes to re-crisp the top.
Freezing recommended
No — best eaten fresh.
Signs it has spoiled
Sour or fishy smell, slimy texture, or grey discoloration.

More recipes to explore

A plate of bacalhau à brás — shredded salt cod with egg and matchstick potatoes, black olives and parsley Portugal flag Portugal 50m
Dinner •Lisbon Tavern Classic

Bacalhau à Brás

Bacalhau à brás recipe: desalted shredded cod, golden matchstick potatoes and softly scrambled egg, finished with black olives and parsley. One serving is about 350 g.

Comfort & Protein

Shredded salt cod folded with egg and crisp matchstick potatoes — a filling, protein-rich Lisbon supper.

Pairs Well With
A simple green salad and a glass of vinho verde
High Protein
A terracotta bowl of caldo verde — pale potato soup with shredded green kale and a spoon Portugal flag Portugal 50m
Dinner •Minho National Soup

Caldo Verde

Caldo verde recipe: creamy potato soup blended smooth, with ribbons of kale and slices of chouriço, finished with a thread of olive oil. One serving is about 590 g.

Comfort & Warmth

Silky potato soup with finely shredded kale and smoky chouriço — Portugal's best-loved bowl.

Pairs Well With
Crusty broa bread and a glass of vinho verde
Soups & Broths
A tray of pastel de nata — golden custard tarts with blistered, caramelised tops in flaky pastry Portugal flag Portugal 50m
Snack & Tea •Belém Monastery Tart

Pastel de Nata

Pastel de nata recipe: shatteringly crisp puff pastry shells filled with warm, vanilla-cinnamon egg custard, baked until blistered on top. One serving is about 187 g (2 tarts).

Sweet Treat

Crisp, flaky pastry cups filled with cinnamon-scented egg custard, blistered in a very hot oven.

Pairs Well With
A small strong coffee (bica) and a dusting of cinnamon
Butterflied piri piri chicken grilling over charcoal, golden-red with chilli spice Portugal flag Portugal 55m
Dinner •Algarve Heritage

Frango Piri Piri

Frango piri piri is Portugal's most famous chicken: a whole bird butterflied flat, rubbed with a fiery paste of piri piri chillies, garlic, lemon and paprika, then grilled over charcoal until the skin turns crisp and red-gold. This piri piri chicken recipe is the Algarve way — an overnight marinade, a hot grill, and a warm butter baste at the end. One serving is about 210 g.

Spicy Char-Grill

A butterflied chicken marinated in piri piri chilli, garlic and lemon, grilled over charcoal until the skin is crisp and reddened.

Pairs Well With
Chips, tomato-onion salad and a cold beer.
High Protein

The Dinner Gazette

Never wonder what’s for dinner again

One email a week with easy dinner ideas from around the world — ingredients, steps and nutrition, tested in our kitchen first.

Delivered every Thursday morning. Unsubscribe anytime.