Bacalhau à Zé do Pipo is a traditional Portuguese cod dish that combines cod loins, caramelised onions, mashed potatoes and mayo, baked in the same dish until golden and crispy. This codfish style is absolutely delicious, packed with Portuguese flavours, with the bonus that it’s a complete meal! Keep on reading to learn how to make authentic Portuguese Baked Cod and Mash!
Who Was ‘Zé do Pipo’?
As you can probably tell by the slightly old-fashioned presentation, Bacalhau à Zé do Pipo was invented in the 40s by José Valentim (Zé do Pipo) a restaurant owner in Porto. The dish became popular in the 60’s when it won a national culinary contest of ‘The Best Meal at the Best Price’. Since then, several restaurants adopted the recipe which consists of cod loins topped with lightly caramelised onions and mayo, adorned with mash potatoes and olives and baked until golden brown.

Authentic Bacalhau à Zé do Pipo
People often think of bacalhau as a difficult ingredient to work with. While cooking with salt cod requires time (you do need to soak it for several hours to sometimes days to remove the salt) the majority of the recipes are pretty simple.
An authentic Zé do Pipo cod requires the usual ingredients you would come across in a Portuguese bacalhau recipe. That is cod loins, potatoes, garlic, onions, milk, olive oil, bay leaves, butter, black pepper, and salt. However, there’s an unconventional ingredient in this bacalhau dish, and perhaps what made Zé do Pipo’s cod recipe stand out among its competitors in the 60s, mayonnaise!
That’s what gives the dish the characteristic golden-brown crust. A proper Zé do Pipo style cod must also feature mashed potato decorations made with a piping bag. They are a little out of style, but we continue to make them, although the grooves created by the piping nozzle will make the mash extra crispy when you bake it.
How to Make Traditional Zé do Pipo Style Cod
Every salt cod recipe starts with the prepping of the fish. In this recipe because we are using cod loins, we need to soak them for about three days changing the water three times a day. When soaking the cod make sure to keep it in a sealed container in the fridge, and to swap the water with cold water too.With the bacalhau ready to be used, we will boil it in milk for a couple of minutes. To add more flavour, we infuse it with bay leaves and pepper corns.

Don’t discard the milk as it will be used in the potato mash. The next step is to peel and chop the potatoes and boil them until fork tender. You then mash them and combine with butter, and some of the cod infused milk, and season with salt, black pepper, and ground nutmeg. Next, we slice the onions, and mince the garlic cloves, and sauté both with plenty of olive oil and a bay leaf until soft and golden. The final step is to whip up your homemade mayonnaise with one egg yolk, Dijon mustard, vinegar, salt, and about 150ml of extra virgin olive oil.

To assemble your Bacalhau à Zé do Pipo, place the cod loins in the middle of a baking tray, top with the caramelised onion and homemade mayo. Pipe the mash potato around the fish, decorate with olives, and bake in the oven at 200°C for about 20 minutes or until the mayo top has turned golden brown. Enjoy!

How to Make Portuguese Cod Bake (Bacalhau à Zé do Pipo)
Have you tried this recipe? Let me know in the comments!
More Traditional Portuguese Cod Recipes You Will Love!
- Bacalhau Espiritual – Portuguese Cod Bake
- Bacalhau da Consoada – Portuguese Christmas Eve Cod
- Bacalhau à Gomes de Sá – Cod, Potato, and Egg Casserole
- Pataniscas de Bacalhau – Portuguese Cod Fritters
- Bacalhau à Braga – Portuguese Cod with Braised Peppers
- Bacalhau à Lagareiro – Portuguese Baked Cod with Potatoes
- Bacalhau à Brás – Authentic Brás Style Cod
- Bacalhau com Natas – Portuguese Codfish with Cream