Netherlands postcode

A Netherlands postcode comprises four digits then two letters.

The official PostNL format mandates a space as a separator between the digits and the letters. In practice, online forms and backend databases omit the separator, and occasionally older legacy systems or international shippers use a hyphen e.g. 1012-AB, although this is technically incorrect.

As with all postcode systems, a naxp encodes postcodes, but validation is a separate task.

Netherlands postcodes are a case study in how strict original constraints on legal characters can later be relaxed when expansion is required. The 1977 format excluded
(a) the letters F, I, O, Q, U and Y – dropped in 2005, and
(b) zero (0) as a first digit – dropped in 2025, with postcodes 0000 AA to 0999 ZZ allocated for the Caribbean Netherlands.

Tip Click on a (pink) naxp to load it, together with examples, onto the interactive page so you can test it for yourself.

Variant naxp Notes
default \9\9\9\9 \s!! \A\A Accepts a postcode with or without a separator space, e.g. 1012 AB or 1012AB.
Prints with a space, e.g. 1012 AB.
no-separator \9\9\9\9 \s!? \A\A Accepts a postcode with or without a separator space, e.g. 1012 AB or 1012AB.
Prints without a space, e.g. 1012AB. (Useful for writing to IT systems.)
hyphen-tolerant \9\9\9\9 (\s|\-)?!(\s) \A\A Accepts a postcode with or without a separator space, or with a hyphen as a separator, e.g. 1012 AB, 1012-AB or 1012AB.
Prints with a space, e.g. 1012 AB.