Local Address Formats by Country
Every country has its own postal address format. This guide covers the templates used in 130+ countries and includes a live conversion tool that transforms standardized address fields into the correct local format.
Why address formatting matters
Incorrect address formats cause delivery failures, poor user experience, and form validation errors. Address field order, punctuation, and the presence of certain fields vary significantly by country.
Street number before or after road
Germany: Musterstraße 42 — France: 42 rue de la Paix
Reversed order (country-first)
Russia and Belarus write country → region → postcode → street → name
CJK scripts (right-to-left address)
China, Japan, Korea use country → province → city → street → name order in native scripts
Combined fields
Australia: CITY STATE POSTCODE all on one line — India: City - POSTCODE
Hyphens and slashes in postcode
Brazil: CEP on its own line — Turkey: postcode + city / region together
Template field reference
Each template uses bracketed tokens that you replace with actual values. Not all fields appear in every country's template.
| Token | Meaning |
|---|---|
[contact_name] | Full name of the addressee |
[house] | Building name, apartment number, or unit |
[house_number] | Street / house number |
[road] | Street, avenue, boulevard, lane… |
[suburb] | Suburb or neighbourhood |
[settlement_part] | Sub-city district, ward, or borough |
[settlement] | City, town, or village |
[county] | County, district, or second-level division |
[region] | State, province, or first-level division |
[region_part] | Prefecture or sub-region |
[postcode] | Postal code or ZIP code |
[country] | Country name |
Address conversion tool
Select a country, fill in the address fields, and see the correctly formatted local address in real time.
🇺🇸Address Fields — United States
Postal (multiline)
Maria Gomez Apt 3B 42 Main Street Berlin, Berlin 10115 Germany
Single-line (building format)
Apt 3B, 42 Main Street, Berlin, Berlin 10115, Germany
Template string
[contact_name]
[house]
[house_number] [road]
[settlement], [region] [postcode]
[country]Implementing in Next.js
The address template data is a static JSON array — no API key required. Fetch it once at build time or bundle it as a module. Here is a minimal implementation:
1Fetch the template data
// Option A: fetch at build time (Next.js RSC)
const res = await fetch(
'https://www.geoapify.com/assets/address-template-by-country.json',
{ next: { revalidate: 86400 } } // revalidate daily
);
const templates = await res.json();
// Option B: bundle locally (faster, works offline)
// Download the JSON and import as a module:
import templates from './data/address-templates.json';2Apply the template
export interface AddressValues {
contact_name?: string;
house?: string;
house_number?: string;
road?: string;
suburb?: string;
settlement_part?: string;
settlement?: string;
county?: string;
region?: string;
postcode?: string;
country?: string;
}
export function formatAddress(
countryCode: string,
values: AddressValues,
templates: { code: string; format: string }[]
): string {
const tpl = templates.find((t) => t.code === countryCode);
if (!tpl) return Object.values(values).filter(Boolean).join(', ');
let result = tpl.format;
for (const [key, val] of Object.entries(values)) {
result = result.replaceAll(`[${key}]`, val ?? '');
}
// Remove empty lines
return result.split('\n').map(l => l.trim()).filter(Boolean).join('\n');
}3Use in a Server Component
import { formatAddress } from '@/utils/address';
import templates from '@/lib/data/address-templates.json';
export default async function OrderPage({ params }) {
const order = await getOrder(params.id);
const formatted = formatAddress('DE', {
contact_name: order.customer.name,
road: order.shipping.street,
house_number: order.shipping.number,
postcode: order.shipping.zip,
settlement: order.shipping.city,
country: 'Deutschland',
}, templates);
return (
<address className="not-italic whitespace-pre-wrap font-mono text-sm">
{formatted}
</address>
);
}Implementation tip
Some countries (China, Japan, Korea, Hong Kong) have two template variants — one for the local script and one in English (e.g. CN_zh vs CN_en). When the user's locale is the local language, prefer the local-script template; otherwise use the English variant. Detect this from navigator.languageor the user's account preferences.
All address templates
Browse the full list of country address templates. Click “View” to expand the full template for any country.
| Flag | Country | Code | Template (condensed) | Details |
|---|---|---|---|---|
| 🇦🇩 | Andorra | AD | house, house_number road, postcode settlement, country... | |
| 🇦🇪 | UAE | AE | house, house_number road, settlement_part, settlement, region, country... | |
| 🇦🇫 | Afghanistan | AF | house, road house_number, settlement_part, settlement, country... | |
| 🇦🇬 | Antigua & Barbuda | AG | house, house_number road, settlement, country... | |
| 🇦🇮 | Anguilla | AI | house, road house_number, settlement, postcode country... | |
| 🇦🇱 | Albania | AL | house, road house_number, postcode settlement, country... | |
| 🇦🇲 | Armenia | AM | house, house_number road, postcode, settlement, region, country... | |
| 🇦🇴 | Angola | AO | house, road house_number, settlement, postcode, country... | |
| 🇦🇷 | Argentina | AR | house, road house_number, settlement_part, postcode settlement, country... | |
| 🇦🇹 | Austria | AT | house, road house_number, postcode settlement, country... | |
| 🇦🇺 | Australia | AU | house, house_number road, settlement region postcode, country... | |
| 🇦🇿 | Azerbaijan | AZ | house, house_number road, postcode settlement, country... | |
| 🇧🇦 | Bosnia & Herzegovina | BA | house, road house_number, postcode settlement, country... | |
| 🇧🇧 | Barbados | BB | house, house_number road, settlement, country... | |
| 🇧🇩 | Bangladesh | BD | house, house_number road, settlement_part, settlement- postcode, country... | |
| 🇧🇪 | Belgium | BE | house, road house_number, postcode settlement, country... | |
| 🇧🇬 | Bulgaria | BG | house, road house_number, settlement_part, postcode settlement, country... | |
| 🇧🇭 | Bahrain | BH | house, house_number road, settlement postcode, country... | |
| 🇧🇳 | Brunei | BN | house, house_number, road, settlement, region postcode, country... | |
| 🇧🇴 | Bolivia | BO | house, road house_number, settlement, country... | |
| 🇧🇷 | Brazil | BR | house, road house_number, settlement_part, settlement - region, postcode, countr... | |
| 🇧🇾 | Belarus | BY | country, region, postcode settlement, suburb, road, house_number, house... | |
| 🇨🇦 | Canada | CA | house, house_number road, settlement, region postcode, country... | |
| 🇨🇭 | Switzerland | CH | house, road house_number, postcode settlement, country... | |
| 🇨🇱 | Chile | CL | house, road house_number, postcode settlement, country... | |
| 🇨🇳 | China | CN | house, house_number road, settlement_part, county, postcode settlement, country... | |
| 🇨🇳 | China (EN) | CN_en | house, house_number road, settlement_part, county, postcodesettlement, country... | |
| 🇨🇳 | China (ZH) | CN_zh | country, postcode, region, county, settlement, settlement_part, road, house_numb... | |
| 🇨🇴 | Colombia | CO | house, road house_number, settlement_part, postcode settlement, region, country... | |
| 🇨🇺 | Cuba | CU | house, road house_number, settlement, postcode, country... |
141 templates shown
Continue your localization implementation
Connect this reference to the format, validation, and testing guidance used elsewhere on the site.
Locale-aware numbers
Separators, grouping, currency precision, and Intl.NumberFormat patterns.
Localization testing
Pseudolocalization, test matrices, native review, and regional release gates.
Address and phone standards
UPU S42, E.164, adaptive forms, storage, parsing, and validation.
I18n architecture
Messages, Unicode, RTL, locale services, fallbacks, and delivery workflow.
Currency reference
ISO 4217 codes, symbols, minor units, and implementation examples.
Phone formats
E.164 storage, regional display, parsing, and validation.
Compare locales
Inspect the same numeric value across several country formats.
Interactive tools
Try number, address, and phone formatting in your browser.