15 minlesson

International Address Formats

International Address Formats

Every country has its own address conventions. Building global applications requires understanding these differences.

Address Ordering Patterns

Western (Street First)

Used in US, UK, Canada, Australia:

1123 Main Street
2New York, NY 10001
3USA

European (Postal Before City)

Used in Germany, France, Netherlands:

1Friedrichstraße 123
210117 Berlin
3Germany

Asian (Large to Small)

Used in Japan, China, Korea:

1〒150-0041
2東京都渋谷区神南1-2-3
3Japan

Country Format Reference

Japan (JP)

1〒150-0041
2東京都渋谷区神南1丁目2番3号
3ABCビル 5階

Order: Postal Code → Prefecture → City → District → Block → Building

ComponentExample
〒 (postal mark)Indicates postal code
Prefecture東京都 (Tokyo-to)
City/Ward渋谷区 (Shibuya-ku)
District神南 (Jinnan)
Block1丁目2番3号

Brazil (BR)

1Av. Paulista, 1000
2Bela Vista
3São Paulo - SP
401310-100
5Brazil

Format: Street, Number, Neighborhood, City - State, CEP

CEP: 8 digits, XXXXX-XXX

China (CN)

1中国
2北京市
3朝阳区
4建国门外大街1号
5100020

Order: Country → Province → City → District → Street → Postal

South Korea (KR)

1(06236)
2서울특별시 강남구 테헤란로 152
3강남파이낸스센터

Order: Postal → City → District → Road → Building

Australia (AU)

1123 Collins Street
2Melbourne VIC 3000
3Australia

Postal Code: 4 digits States: NSW, VIC, QLD, SA, WA, TAS, NT, ACT

Parsing Strategies by Region

Country Detection

javascript
1function detectCountryFromFormat(address) {
2 // Japanese postal mark
3 if (/?\d{3}-?\d{4}/.test(address)) return 'JP';
4
5 // Brazilian CEP
6 if (/\d{5}-\d{3}/.test(address)) return 'BR';
7
8 // UK postcode at end
9 if (/[A-Z]{1,2}\d[A-Z\d]?\s?\d[A-Z]{2}\s*$/i.test(address)) return 'GB';
10
11 // German/French PLZ before city
12 if (/,\s*\d{5}\s+[A-Za-zäöüÄÖÜß]/.test(address)) return 'DE';
13
14 // Default to US
15 return 'US';
16}

Script Detection

javascript
1function detectScript(text) {
2 if (/[\u3040-\u309F\u30A0-\u30FF]/.test(text)) return 'japanese';
3 if (/[\u4E00-\u9FFF]/.test(text)) return 'chinese';
4 if (/[\uAC00-\uD7AF]/.test(text)) return 'korean';
5 if (/[\u0400-\u04FF]/.test(text)) return 'cyrillic';
6 if (/[\u0600-\u06FF]/.test(text)) return 'arabic';
7 return 'latin';
8}

Best Practices

  1. Don't assume US format - Support international from day one
  2. Store original script - Keep addresses in native characters
  3. Add transliteration - Latin version for shipping labels
  4. Validate by country - Apply country-specific rules
  5. Handle missing components - Not all countries use states
International Address Formats - Anko Academy