Bacalhau à Zé do Pipo is comfort food with a pedigree: flaky salt cod under golden mayonnaise, ringed by piped mashed potatoes and baked until bubbling. It was created in Porto by the owner of the tavern Zé do Pipo, and legend has it the dish won a national culinary competition in the 1960s — one taste and you will see why it spread across all of Portugal.
This is the bacalhau dish I recommend to anyone intimidated by salt cod: the technique is forgiving, the components are familiar, and the result looks far fancier than the effort involved.
The homemade mayonnaise is worth the ten extra minutes — it turns golden and rich in the oven in a way store-bought never quite matches. But on a busy day, a good jarred mayo still delivers.
Bacalhau à Zé do Pipo Recipe
Prep time: 20 minutes · Cook time: 35 minutes · Total: 55 minutes · Servings: 4 · Calories: ~344 per serving
Ingredients
- 1 pound thick salt cod fillets, desalted
- 1 cup milk
- 1 garlic clove, minced
- 2 onions, chopped
- ½ cup olive oil
- 2 bay leaves
- 2 pounds mashed potatoes
- Breadcrumbs, for sprinkling
- Fresh parsley, for garnish
- Coarse salt and freshly ground pepper
- For the mayonnaise:
- 1 large egg
- 1 teaspoon Dijon mustard
- ½ cup extra-virgin olive oil
- 1 tablespoon white-wine vinegar
- ½ cup vegetable oil
- Coarse salt and freshly ground pepper
Instructions
- Simmer the cod in the milk with the minced garlic for 15 to 20 minutes, then remove from the heat.
- Meanwhile, cook the onions with the bay leaves in the olive oil over medium heat until soft. Add 3 tablespoons of the cod-cooking milk, let it bubble, and season with salt and pepper.
- Preheat the oven to 400°F. Drain the cod, place it in a baking dish (clay, traditionally) and cover with the onion mixture.
- Pipe the mashed potatoes around the cod using a pastry bag with a large star tip.
- Make the mayonnaise: whisk the egg with the mustard, then slowly drizzle in the olive oil while whisking until emulsified. Whisk in the vinegar, then slowly add the vegetable oil the same way. Season with salt and pepper.
- Spread the mayonnaise over the cod, sprinkle with breadcrumbs, and bake until golden and bubbling, about 20 minutes.
- Garnish with parsley and serve immediately.
Recipe Notes
- Black olives or capers in the onion mixture, grated cheese in the mashed potatoes, or lemon zest in the mayonnaise are all worthy upgrades.
- A pinch of paprika or cayenne adds gentle heat; thyme or rosemary bring aroma.
- The homemade mayonnaise uses raw egg — use a very fresh or pasteurized egg, or substitute good store-bought mayo.
- Haddock, halibut or sea bass can stand in for cod, with slightly adjusted cooking times.
- Leftovers keep 3 days refrigerated; reheat in the oven for the best texture.

