Skip to main content
EU पोस्टल कोड Formats: Developers के लिए देश-दर-देश Reference
Guides

EU पोस्टल कोड Formats: Developers के लिए देश-दर-देश Reference

European postal codes की length, format और meaning बहुत vary करती है। यह गाइड EU-27 plus UK, Switzerland और Norway का country-by-country reference है

Brent van der Heiden5 min read
#postal codes#european postal codes#address validation#geocoding#eu data#regex

हर developer जिसने European customers के लिए address form build किया है उसे eventually सच पता चलता है: कोई European postal code format नहीं है। हर देश का अपना है, और variations genuinely meaningful हैं। यह page EU-27 plus key non-EU European countries का country-by-country reference है, regex patterns और validation tips के साथ जो आपको production में चाहिए।

High-Level Pattern

European postal codes roughly चार groups में split होते हैं:

  1. 5-digit numeric: Germany, France, Italy, Spain, Finland, Croatia, Estonia, Greece, Lithuania, Slovakia।
  2. 4-digit numeric: Belgium, Bulgaria, Hungary, Austria, Switzerland, Liechtenstein, Luxembourg, Norway, Slovenia, Denmark।
  3. Alphanumeric, fixed format: Netherlands (4 digits plus 2 letters), Ireland (Eircode, 7 alphanumeric), Malta (3 letters plus 4 digits)।
  4. Hierarchical alphanumeric: United Kingdom (variable-length, two-part)।

Plus कुछ outliers: Sweden तीसरे के बाद space के साथ 5 digits use करता है (123 45), Poland दूसरे के बाद hyphen के साथ 5 digits (00-001), Czechia तीसरे के बाद space के साथ 5 digits (110 00)।

EU-27 Reference

CountryISOFormatExampleRegex
AustriaAT4 digits1010^\d{4}$
BelgiumBE4 digits1000^\d{4}$
BulgariaBG4 digits1000^\d{4}$
CroatiaHR5 digits10000^\d{5}$
CyprusCY4 digits1010^\d{4}$
CzechiaCZNNN NN110 00^\d{3} ?\d{2}$
DenmarkDK4 digits1050^\d{4}$
EstoniaEE5 digits10111^\d{5}$
FinlandFI5 digits00100^\d{5}$
FranceFR5 digits75008^\d{5}$
GermanyDE5 digits10115^\d{5}$
GreeceGRNNN NN105 63^\d{3} ?\d{2}$
HungaryHU4 digits1051^\d{4}$
IrelandIEEircodeD02 X285^[A-Z]\d{2} ?[A-Z0-9]{4}$
ItalyIT5 digits00184^\d{5}$
LatviaLVLV-NNNNLV-1050^LV-\d{4}$
LithuaniaLTLT-NNNNNLT-01100^LT-\d{5}$
LuxembourgLU4 digits1234^\d{4}$
MaltaMTLLL NNNNVLT 1234^[A-Z]{3} ?\d{4}$
NetherlandsNLNNNN LL1011 AB^\d{4} ?[A-Z]{2}$
PolandPLNN-NNN00-001^\d{2}-\d{3}$
PortugalPTNNNN-NNN1000-001^\d{4}-\d{3}$
RomaniaRO6 digits010001^\d{6}$
SlovakiaSKNNN NN811 01^\d{3} ?\d{2}$
SloveniaSI4 digits1000^\d{4}$
SpainES5 digits28013^\d{5}$
SwedenSENNN NN111 22^\d{3} ?\d{2}$

Key Non-EU European Countries

CountryISOFormatExampleRegex
United KingdomGBhierarchicalSW1A 1AA^[A-Z]{1,2}\d[A-Z\d]? ?\d[A-Z]{2}$
SwitzerlandCH4 digits8001^\d{4}$
NorwayNO4 digits0150^\d{4}$
IcelandIS3 digits101^\d{3}$
LiechtensteinLI4 digits9490^\d{4}$

UK Postcode विस्तार से

UK system Europe में सबसे information-dense है। SW1A 1AA जैसा code decompose होता है:

  • SW: postal area (London South West)
  • SW1A: postal district (St James's and Pimlico)
  • SW1A 1: postal sector (कुछ streets)
  • SW1A 1AA: postal unit (specific delivery point, अक्सर एक building)

यह hierarchy का मतलब है UK postcode एक building identify कर सकता है, इसीलिए UK products अक्सर postcode को neighbourhood-level या street-level grouping के proxy के रूप में use करते हैं। लगभग किसी दूसरे देश का postal code system यह नहीं करता।

Production Validation Patterns

Cheapest production approach ऊपर जैसा per-country regex table है, address से country code के आधार पर applied। Country code आ सकती है:

  • User ने explicit dropdown से select किया
  • User की IP geolocation
  • Geocoder result (अधिकतर production geocoders postal code normalize करते हैं और response में country code include करते हैं)

Country जाने बिना postal code validate करने की कोशिश न करें। 4-digit code 12 countries में valid है और कई में invalid।

High-stakes flows के लिए (checkout, KYC, regulated industries), regex पर मत रुकें। Address को geocoder को send करें और "rooftop" या "street" precision response को validation मानें, केवल regex match को नहीं। Correctly formatted postal code फिर भी real address match करने में fail कर सकता है।

Storage और Normalisation

Postal codes को strings के रूप में store करें, numbers के रूप में नहीं। Leading zeros मायने रखते हैं (01100 valid Lithuanian code है; 1100 नहीं है)। Storage format conventions:

  • Data sets में compare करते समय non-alphanumeric characters strip करें।
  • Output पर country-canonical form में display करें (hyphens, spaces, prefixes के साथ)।
  • Postal code के साथ हमेशा country code store करें, भले ही आपका product आज केवल एक country में operate करे। Schema बिना migration के multi-country expansion तक scale होता है।

MapAtlas कैसे Help करता है

MapAtlas Geocoding API हर supported country के लिए normalised address_components.postal_code field return करता है, source data के against validated। Search API postal code को search input के रूप में accept करता है और matching place return करता है। दोनों APIs EU-hosted, GDPR-compliant हैं, और explicit per-country address parsers के साथ OSM-grade data पर built हैं।

Addresses coordinates कैसे बनती हैं इसकी deeper look के लिए, What Is a Geocode देखें। हर coordinate response के पीछे longitude और latitude mechanics के लिए, Longitude vs Latitude देखें।

अक्सर पूछे जाने वाले प्रश्न

European postal codes का format क्या है?

कोई single European postal code format नहीं है। हर देश अपना define करता है। अधिकतर fixed-length numeric code use करते हैं (Germany, France, Italy, Spain में 5 digits; Belgium, Hungary, Austria, Switzerland में 4 digits), लेकिन कई alphanumeric codes use करते हैं (Netherlands 4 digits plus 2 letters, United Kingdom complex two-part alphanumeric system, Ireland Eircode 7 alphanumeric characters use करता है)। एक working address validator को EU-27 plus key non-EU European countries के लिए per-country pattern hold करना होता है।

क्या German postal code (Postleitzahl) Polish postal code जैसा है?

दोनों पाँच characters हैं लेकिन structure अलग है। Germany 5 contiguous digits use करता है (जैसे 10115)। Poland 2 digits, एक hyphen, फिर 3 digits use करता है (जैसे 00-001)। Storage के लिए, Poland के लिए canonical form hyphen के साथ और Germany के लिए बिना hold कर सकते हैं। Data sets में matching के लिए, non-alphanumeric characters strip करके normalize करें और display पर country-specific format re-apply करें।

किसी भी EU country का postal code validate कैसे करें?

पहले country identify करें (address से, ISO 3166-1 alpha-2 country code से, या user की geolocation से)। फिर उस country का regex pattern apply करें। Country-aware validation standard production pattern है, क्योंकि एक single global regex या तो valid codes reject करेगा या clearly invalid ones accept करेगा। MapAtlas Geocoding API `address_components` में per-country normalised postal code return करता है, इसलिए आप आमतौर पर geocoder को validation step करने देते हैं।

United Kingdom postal code system इतना अलग क्यों दिखता है?

UK postcodes hierarchical alphanumeric system use करते हैं जो postal area, district, sector, और unit को दो parts में encode करता है (जैसे Buckingham Palace के लिए SW1A 1AA)। यह per code अधिकतर country systems से ज़्यादा spatial information carry करता है, इसीलिए UK postcodes को neighbourhood या individual streets के proxy के रूप में use किया जाता है। System 1950s और 1960s में designed हुआ और modern data infrastructure में retrofit होता आ रहा है।

यह उपयोगी लगा? इसे साझा करें।

लेखक के बारे में

Brent van der Heiden

लेखक

Brent van der Heiden

Co-Founder & CEO at MapAtlas

Brent built MapAtlas out of a conviction that developers deserve location APIs with fair pricing and genuine end-user privacy. He writes about geospatial infrastructure, AI search visibility, and how location data powers the products people rely on every day.

सभी लेख देखें
ब्लॉग पर वापस जाएं