EU VAT Number Format Checker Widget
Let buyers and sellers check that an EU VAT identification number is written in the right shape for its Member State - or a Northern Ireland XI number - before an invoice goes out, one at a time or in a pasted list, with a direct link to the European Commission's VIES service for the real registration check.
Live preview
Under the widget on your page: Powered by A2Z Tools
Embed code
<iframe src="https://a2z.tools/embed/w/eu-vat-number-format-checker" title="EU VAT Number Format Checker by A2Z Tools" width="100%" height="890" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>
A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.
<div data-a2z-widget="eu-vat-number-format-checker" data-height="890"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
Works with
How it works
The number is upper-cased and spaces, dots and hyphens are dropped, so "de 123 456 789" becomes DE123456789. The first two letters choose the structure published in the European Commission's VIES FAQ: 27 Member State prefixes plus XI for Northern Ireland. Greece uses EL, not GR, and GB numbers are explained rather than checked, because VIES stopped validating them on 1 January 2021. The remainder must match the official pattern: Austria U followed by 8 digits, Belgium 10 digits starting 0 or 1, France 2 letters-or-digits then 9 digits, the Netherlands 12 characters that may include + or *, Romania 2 to 10 digits, Spain 9 characters whose first and last may not both be digits. XI numbers may be 9 or 12 digits, or GD or HA plus 3 digits for government departments and health authorities. A number typed without its prefix can be checked by choosing the country. National check digits are not tested, and only VIES can confirm that a number is registered and valid for cross-border trade - the result links straight to it.
Method
- Normalise: upper-case; remove spaces, dots and hyphens
- Prefix = first 2 letters (AT ... SK, EL for Greece, XI for Northern Ireland), or the chosen Member State when no prefix is typed
- National part must match the VIES pattern (9 = digit, X = letter or digit, S = letter, digit, + or *, L = letter)
- Spain: first and last characters may not both be digits (VIES note 4)
- Registration status: not checked - link to VIES
Worked examples
Spaces and lower case
Inputs: de 123 456 789
Result: Valid format DE123456789 - Germany, structure DE999999999
9 digits after the DE prefix.
Spanish rule
Inputs: ES123456789
Result: Not a valid EU VAT number format - Spanish numbers may not start and end with a digit (VIES note 4)
Use ESX9999999X: first or last must be a letter.
Northern Ireland department
Inputs: XIGD123
Result: Valid format XIGD123 - Northern Ireland, government department
VIES note 6: GD identifies government departments.
A format check, not confirmation that a VAT number is registered or valid for intra-EU trade. Confirm on the official VIES service before relying on it.
Limitations
- Structure only: national check-digit algorithms are not applied and registration is not checked - use VIES for that.
- The patterns follow the VIES FAQ; VIES gives no start date for them, so they reflect the version read on the verified date.
- UK (GB) VAT numbers are not checked; they are verified with HMRC, not VIES.
Where publishers use it
- A B2B checkout page where EU business customers check their VAT number before claiming the reverse charge
- An accounts-receivable guide for checking the VAT numbers on a customer list before invoicing
- A Northern Ireland trader's page explaining the XI prefix and how it differs from GB
- A freelancer's invoicing help page showing where a client's VAT number should be verified
- An ERP or CRM data-quality checklist: paste 200 numbers and copy back the well-formed ones
Questions
Does a valid format mean the VAT number is real?
No. The widget only compares the number with the official structure. Whether it is issued, active and valid for intra-EU trade can only be confirmed on the European Commission's VIES service, which the widget links to. A2Z never contacts VIES itself.
Why does Greece use EL?
VIES uses the prefix EL for Greek VAT numbers, followed by 9 digits; GR is Greece's ISO country code and is not accepted as a VAT prefix, so GR123456789 is flagged with the suggestion EL123456789.
What is an XI VAT number?
Since 1 January 2021, businesses in Northern Ireland covered by the Protocol on Ireland and Northern Ireland use the XI prefix, and VIES checks XI numbers instead of GB ones. The shapes are XI + 9 digits, XI + 12 digits for branch traders, XIGD + 3 digits for government departments and XIHA + 3 digits for health authorities.
Why was a Spanish number rejected even with 9 characters?
VIES notes that the first and last characters of a Spanish number may each be a letter or a digit, but not both digits. ESX1234567X and ES12345678Z fit; ES123456789 does not.
Can I type a number without its country prefix?
Yes - choose the Member State and the widget adds the prefix before checking, so U12345678 with Austria becomes ATU12345678. If you type a prefix as well, the prefix wins and the widget says so.
Are national check digits tested?
No. Most Member States add a check digit calculated by their own rules; this widget tests only the published structure, so a number with a mistyped digit can still show a valid format.
Sources
- VIES FAQ - VAT identification number structure - European Commission, DG Taxation and Customs Union . Structure of the VAT number for each Member State and XI (9 = digit, X = letter or digit, S = letter, digit, + or *, L = letter) and notes 4-7. Checked 2026-10-03.
- VIES VAT number validation - European Commission . Official registration check for EU and XI VAT numbers; GB validation ceased on 1 January 2021 and XI validation began. Checked 2026-10-03.
Cite or recommend this tool
If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.
A2Z Tools EU VAT Number Format Checker https://a2z.tools/embed/eu-vat-number-format-checker
<a href="https://a2z.tools/embed/eu-vat-number-format-checker">A2Z Tools EU VAT Number Format Checker</a>
[A2Z Tools EU VAT Number Format Checker](https://a2z.tools/embed/eu-vat-number-format-checker)
EU VAT Number Format Checker by A2Z Tools - https://a2z.tools/embed/eu-vat-number-format-checker
Related widgets
-
Standard and reduced VAT rates of all 27 EU Member States, dated and sourced, with a net/gross calculator.
-
Check an IBAN's length, layout and mod-97 checksum for 89 registry countries, entirely in the browser.
-
Check a BIC/SWIFT code's ISO 9362 structure, country, test-code marker and branch - format only, no lookup.
-
Add VAT to a net price or extract it from a gross price, at a UK rate or any rate you type.
-
Profit, gross margin and markup from cost and price - or the price for a target margin.
-
Selling price from cost plus markup, or work back to the cost or the markup you applied.