VAT number formats by country

The national format of every EU and EFTA VAT number, so you can reject malformed input before you ever call a lookup service.

Format check first, lookup second

Every VAT number starts with a two-letter country code followed by the national body. The body has a fixed shape per country, so a format check catches obvious typos and test data instantly, with no upstream call. Existence checks (VIES or a national registry) are a separate, slower step that only makes sense after the format is right.

CodeCheck validates the format of all 31 countries below. Try one in the browser demo or read the VAT reference page.

curl "https://<your-worker>.workers.dev/v1/validate/vat/DE123456789"

Formats

CountryBody format
ATAT, U and 8 digits
BEBE, 10 digits starting with 0 or 1
BGBG, 9 or 10 digits
CHCH, E, 9 digits and an optional MWST, TVA or IVA
CYCY, 8 digits and a letter
CZCZ, 8, 9 or 10 digits
DEDE, 9 digits
DKDK, 8 digits
EEEE, 9 digits
ELEL, 9 digits
ESES, 9 characters
FIFI, 8 digits
FRFR, 2 characters and 9 digits
GBGB, 9 or 12 digits, or GD or HA and 3 digits
HRHR, 11 digits
HUHU, 8 digits
IEIE, 8 or 9 characters
ITIT, 11 digits
LTLT, 9 or 12 digits
LULU, 8 digits
LVLV, 11 digits
MTMT, 8 digits
NLNL, 9 digits, B and 2 digits
NONO, 9 digits and MVA
PLPL, 10 digits
PTPT, 9 digits
RORO, 2 to 10 digits
SESE, 12 digits
SISI, 8 digits
SKSK, 10 digits
XIXI, 9 or 12 digits, or GD or HA and 3 digits

Reference pages