Address hierarchy depth and order vary by country
Aliases: international address structure · address components · postal address template
What it is
A country-specific address hierarchy means that the components of a delivery address, their repetition and nesting, and their final written order depend on the destination country, territory, and sometimes postal operator. There is no universal street-number–street–city–state–postcode tree. UPU S42 supplies common elements and a template language, with country templates maintained through UPU; ISO 19160-4:2023, based on S42, specifies components, constraints, rendering rules, and a machine-readable template language rather than bundling a country-template library itself.
Why it happens
Addresses serve human recognition, postal sorting, and last-mile delivery. One system may locate a place by street and premise number; another may rely on village, district, landmark, post-office box, building, or several administrative levels. Writing from broadest to narrowest or in the opposite direction also follows local writing and delivery practices. Excessive structure forces valid local content into false levels, while one undifferentiated text box loses semantics needed for lookup, validation, and rendering. A robust model therefore combines a country or territory schema with free-form address lines: known components remain structured, details that cannot be split reliably remain intact, and the destination template controls rendition.
Studying it
Start with addressing guidance from the designated postal operator and UPU, then map real samples to components and reassemble them in the manner used to develop S42 templates. Any sample that cannot make a lossless round trip exposes a schema gap. Include residences, organizations, post-office boxes, rural and landmark-based locations, building complexes, and local-language variants—not only standard capital-city street addresses. Compare free-form, fully structured, and hybrid collection by completion, manual correction, delivery failure, autocomplete acceptance, and semantic preservation after formatting. Postal addresses are personal data, so sample and log analysis require minimization and de-identification.
Where it stops holding
Postal, navigation, legal-residence, and billing addresses may refer to the same place without sharing components or authorities. Multiple languages, exceptional territories, and address types can coexist within one country, so a national template is a versioned baseline rather than an eternal truth. Successful geocoding does not prove postal deliverability, and correct postal form does not prove residence. Preserve submitted free-form lines as collection source data and store the template-rendered label separately; neither should overwrite the other.
Applying it
- Use destination country or territory as the top-level context, with versioned metadata for allowed components, levels, labels, requiredness, and output templates. Keep country exceptions out of business-code conditionals.
- Store a country code, known semantic components, and one or more free-form delivery lines. Leave landmarks, buildings, rooms, villages, and other details intact when they cannot be split reliably.
- Separate the collection schema from the postal-label rendering template. Render one structured record in destination postal order while retaining local script and meaningful line breaks from the input.
- Run parse–format–parse round trips over official examples from every target market, checking for loss, reordering, duplication, and false hierarchy; then have local users review whether generated labels are natural and deliverable.
Related
- Same group: S2.06.2 Postal codes are not universal in presence, length, or format · S2.06.3 A state or province field is not universally applicable · S2.06.4 Address forms should rearrange dynamically by country
- Adjacent: S2.05 Name formats and forms of address · S2.09 Regional differences in input validation
- Search terms:
UPU S42·ISO 19160-4·postal address template