Portuguese postcodes contain four digits, a hyphen and three digits. Keep the postal locality with the postcode; a city name alone is not a complete delivery address.
The example below illustrates field layout using a fictional street. It is not a verified mailing address.
Address layout example
1000-001 LISBOA
PORTUGAL
| Field label | Meaning |
|---|---|
| Rua / Avenida | Street / avenue |
| Número | House number |
| Código Postal | Postal code |
| Localidade | Locality / postal town |
Why is a postcode not a number?
1234-567 is a format illustration, not an arithmetic expression. Keep postcodes in string fields and separate format validation from an address lookup. If a form accepts input without the hyphen, show the normalized result explicitly instead of rewriting the value silently after submission.
How does Localidade map to City?
Localidade refers to the locality used in the postal address, while a software field labelled City may have a broader meaning. Establish which value the receiving system expects before mapping the data. Lisboa and Lisbon are useful language-alias tests, but changing the display language does not verify a postcode against a generated street.
What should I check after a CSV import?
Inspect the original CSV first to see whether the hyphen is still present, then check the import column type. Compare each stored field with its original text, including Rua or Avenida, accents in locality names and additional address lines. Checking only the combined full address can hide mistakes in the underlying columns.
Regression checklist
- Keep the postcode as text so numeric conversion does not remove its hyphen
- Treat Lisboa and Lisbon as name aliases while preserving the input
- Round-trip ç and ã through exports and imports
What the generator currently covers
Current coverage is a small set of Lisbon-area fixtures. Street numbers are synthetic, and the city/postcode combinations are not verified by CTT for delivery.
Try the Portugal address generator