1001Ferramentas
๐Ÿ“ฎValidators

Portugal Postal Code Validator

Validate Portuguese postal codes (####-###) and identify region by first two digits (Lisboa, Porto, Coimbra, etc.).

โ€”

Portuguese postal codes: the CTT 7-digit system

In Portugal the postal code (codigo postal) is managed by CTT โ€” Correios de Portugal, the historic postal operator privatised in 2013 but still the official authority for postal addressing. The current format is seven digits in the pattern NNNN-NNN: four digits, a hyphen and three digits. The first four identify a regional zone; the trailing three drill down to a street segment, a building or a large customer.

The system was introduced in 1978 with only four digits and a textual designator (for example 1000 Lisboa). In 1998 CTT migrated to the full 4+3 scheme to support automated sorting and door-to-door routing. Today there are over 200,000 active postal codes covering mainland Portugal, the Azores and Madeira.

Geographic distribution of the first digit

  • 1xxx Lisboa metropolitan area (1000-1099 covers Lisbon central districts).
  • 2xxx Setubal, Santarem, Sintra and the West region.
  • 3xxx Centre โ€” Coimbra, Leiria, Aveiro.
  • 4xxx Porto and the North (4000-4099 is central Porto).
  • 5xxx Tras-os-Montes, Vila Real, Braganca.
  • 6xxx Beira Interior โ€” Castelo Branco, Guarda, Covilha.
  • 7xxx Alentejo โ€” Evora, Beja, Portalegre.
  • 8xxx Algarve โ€” Faro, Portimao, Albufeira.
  • 9xxx Azores and Madeira archipelagos.

Special-purpose codes

Some ranges are reserved for high-volume mail receivers (CTT apartados, government bodies, large companies). The last three digits do not always correspond to a public street: they may identify a building lobby or an internal sorting key.

Where the postal code is needed

  • E-commerce delivery: Shopify, WooCommerce and Magento checkouts validate the 4+3 mask before quoting CTT, DPD or DHL shipping.
  • Tax invoices (Fatura): the e-Fatura system from the Portuguese Tax Authority requires the postal code on every invoice over โ‚ฌ1000.
  • CRM and KYC: banks, insurers and telcos cross-check postal code against IBAN and address proof.
  • Cross-border Brazilian sellers: marketplaces like Mercado Livre PT, OLX PT and Amazon.es shipping to PT must validate the 4+3 mask to avoid Devolvido ao Remetente returns.

APIs and authoritative sources

CTT publishes the official lookup at ctt.pt/pesquisa-codigo-postal. There are paid bulk-data licences for the full Base de Dados Nacional de Codigos Postais. Free third-party APIs such as codigo-postal.pt and geoapi.pt proxy the data with rate limits. For real shipping rates, integrate the CTT API REST or UPS/DHL EU endpoints.

PT postal code versus Brazilian CEP and other European formats

The Brazilian CEP has 8 digits in the mask NNNNN-NNN (5+3). The Portuguese code has 7 digits in the mask NNNN-NNN (4+3). Other European references:

  • Spain: 5 digits (NNNNN).
  • France: 5 digits.
  • UK: alphanumeric, mixed format SW1A 1AA.
  • Germany: 5 digits.
  • Netherlands: 4 digits + 2 letters (1011 AB).

For Brazilians sending goods to Portugal via Correios Internacionais, the destination CEP field expects the PT 7-digit format. Documents from Brazil presented in Portugal (birth certificate, diploma) must carry the Apostille of The Hague Convention issued by a Brazilian tabeliao.

FAQ

Can I use a generated code for a real shipment?

No. This tool only confirms that a string matches the syntactic mask NNNN-NNN. For real delivery the postal code must exist in the CTT database and resolve to a physical address. Use the official CTT lookup before printing a label.

Are the Azores and Madeira included?

Yes. Both archipelagos sit in the 9xxx range (Madeira concentrated in 9000-9399, Azores in 9500-9990).

How does PT postal code differ from the Brazilian CEP?

PT uses 4+3 digits and a hyphen; BR uses 5+3 digits and a hyphen. Format validators must not be reused โ€” a Brazilian CEP regex will reject every Portuguese code and vice versa.

Is the lookup free?

CTT offers a free per-query search on its public site. Bulk data and the full database require a commercial licence. Geoapi.pt and similar proxies are free for low volume.

Does this validator send my data anywhere?

No. The mask check runs locally in your browser. Nothing is transmitted to a server and no log is created.

Related Tools