EU VAT number validation: the complete guide

A practical, source-linked guide to validating EU VAT numbers for invoicing, onboarding and checkout. Written by W System, maker of the api.wsystem.dev VAT validation API (disclosure: we sell the API described in section 7). Last checked 2026-10-17.

1. What an EU VAT number is

Every VAT-registered business in the EU has a VAT identification number: a two-letter country prefix followed by 2–13 characters. Greece uses EL (not GR). Northern Ireland traders use XI for goods since 2021. Great Britain (GB) numbers left the EU system on 1 January 2021 and are checked with HMRC.

CountryPrefixFormat (after prefix)Example
AustriaATU + 8 digitsATU12345678
BelgiumBE10 digits (0 or 1 first)BE0123456789
BulgariaBG9–10 digitsBG123456789
CroatiaHR11 digitsHR12345678901
CyprusCY8 digits + letterCY12345678L
CzechiaCZ8–10 digitsCZ12345678
DenmarkDK8 digitsDK12345678
EstoniaEE9 digitsEE123456789
FinlandFI8 digitsFI12345678
FranceFR2 check chars + 9-digit SIRENFR40303265045
GermanyDE9 digitsDE811193231
GreeceEL9 digitsEL123456789
HungaryHU8 digits (first 8 of the adószám)HU33119856
IrelandIE7 digits + 1–2 lettersIE6388047V
ItalyIT11 digitsIT12345678901
LatviaLV11 digitsLV12345678901
LithuaniaLT9 or 12 digitsLT123456789
LuxembourgLU8 digitsLU12345678
MaltaMT8 digitsMT12345678
NetherlandsNL9 digits + B + 2 digitsNL123456789B01
PolandPL10 digitsPL1234567890
PortugalPT9 digitsPT123456789
RomaniaRO2–10 digitsRO1234567
SlovakiaSK10 digitsSK1234567890
SloveniaSI8 digitsSI12345678
SpainES9 characters (letter/digit first and last)ESX1234567X
SwedenSE12 digits (ends in 01)SE123456789701
Northern IrelandXI9 or 12 digits, or GD/HA + 3XI123456789

A correct format does not mean the number is registered. Only VIES confirms that.

2. VIES: the official source

VIES (VAT Information Exchange System) is run by the European Commission. It does not hold its own database: each request is forwarded live to the national tax administration of the number's country, which answers valid/invalid and, depending on national rules, the registered name and address. Access options:

All are free and need no key. Limitations: one number per call, national backends go offline (often evenings and weekends), concurrency limits (MS_MAX_CONCURRENT_REQ), and the EC states that VIES is for confirming validity, not for building databases.

3. When you must (or should) validate

This is general information, not tax advice.

4. Keeping proof: the consultation number

If you include your own EU VAT number as the requester, VIES returns a consultation number (e.g. WAPIAAAAaFIeQCDg), a reference that the check happened on that date. Many tax authorities accept it as evidence of due diligence. Store it with the invoice. Germany's BZSt runs its own "qualifizierte Bestätigungsabfrage" for German businesses.

5. Results and error codes

VIES answerMeaningWhat to do
valid = trueRegistered for intra-EU transactionsStore date + consultation number
valid = falseNot registered (or not enabled for intra-EU trade)Ask the customer; charge VAT
INVALID_INPUTMalformed numberFix prefix/format
MS_UNAVAILABLE / TIMEOUT / SERVICE_UNAVAILABLENational backend or VIES downUnknown, not invalid: retry later (guide)
MS_MAX_CONCURRENT_REQ / GLOBAL_MAX_CONCURRENT_REQRate limitedBack off and retry

6. Code: calling VIES directly

curl -s -X POST https://ec.europa.eu/taxation_customs/vies/rest-api/check-vat-number \
  -H 'Content-Type: application/json' -d '{"countryCode":"IE","vatNumber":"6388047V"}'

You then handle retries, caching, batch loops and the error codes above yourself.

7. Code: using a wrapper API (ours)

curl "https://api.wsystem.dev/verify?vat=IE6388047V"
curl -X POST https://api.wsystem.dev/verify/batch -H 'Content-Type: application/json' -d '{"vats":["IE6388047V","DE811193231"]}'

Free for 20 calls/day per IP without a key; $0.01 per call via x402 after that; also as an MCP tool for AI agents. Details: EU VAT validation API.

8. Checklist

  1. Normalise input (strip spaces/dots, uppercase, EL for Greece).
  2. Check the format locally.
  3. Validate in VIES with your requester VAT.
  4. Treat unavailable as unknown and retry.
  5. Store date, result and consultation number with the transaction.
  6. Re-validate recurring customers periodically (e.g. quarterly).

Facts and competitor details checked 2026-10-17. W System Hungary Kft. is the maker of this product. Not affiliated with the European Commission. Not legal or tax advice.