The official way to check an EU VAT number is VIES, and VIES has two habits that cost time: it is rate-limited, and whole member states drop out of it for hours. What VIES never tells you is whether a number is even structurally possible. This validator answers exactly that, offline: country format plus the national check digit algorithm, for one ID or a whole customer list, with the reason spelled out for every failure.
What this validator checks
Every number goes through the same three stages, and the report always names the stage it reached, because the honest answer to "is this VAT ID valid" has three parts:
- Format. Each country has an exact shape: DE takes 9 digits and the first is never 0, ATU takes the letter U and 8 digits, NL takes 9 digits, a B and 2 more. A number that fails here is wrong no matter what any registry says, and the report tells you how it misses, for example "Austria expects ATU followed by 8 digits, this has 7 digits after the U".
- Check digits. Nearly every country bakes a checksum into the number. Where the algorithm is public, it runs here: ISO 7064 MOD 11,10 for Germany and Croatia, Luhn for Italy and Sweden, mod 97 for Belgium, mod 89 for Luxembourg, weighted sums elsewhere. A handful of number types have no reliable public rule, and the report says so instead of pretending: French keys with letters, Czech and Latvian personal numbers, the Spanish K/L/M series. Those get a "format verified" badge, never a fake pass.
- Registration. This stage is named but deliberately not performed. Whether a structurally valid number is assigned and active right now, only the registry knows, and that means VIES, or HMRC for GB, or the Swiss UID register. No offline tool can answer it, including this one, and any tool implying otherwise is overselling.
Before stage 1, each line is normalized: spaces, dots, dashes and case are ignored, GR becomes the EL prefix Greece actually uses, a doubled prefix loses one copy, a missing U after AT is inserted, a 9-digit legacy Belgian number gets its leading 0. Every repair is listed in the notes so the exported report shows what should be fixed in the source data. Two options round it off: --guess-country takes a line pasted without its prefix, tests it against every country and names the unique match if there is one, and --duplicates flags lines that normalize to the same ID.
Anatomy of a VAT number
An EU VAT ID is a two-letter country prefix plus a national number. The prefix follows ISO 3166 with two exceptions worth knowing: Greece uses EL instead of GR, and Northern Ireland uses XI, a code invented for the Brexit protocol. Switzerland is outside the system entirely and writes its number as CHE-123.456.789 MWST.
The national part is rarely a number invented just for VAT. Most countries reuse their company register: a French VAT ID is a 2-digit key in front of the SIREN, a Swedish one is the organisationsnummer with 01 appended, a Danish one is the CVR number, a Czech one the IČO. That is why the shapes differ so much, from Romania's 2 digits minimum to Lithuania's 12, and why the check digit algorithms are national inventions rather than one EU scheme. It also means a VAT ID often leaks a little structure: the Dutch B01 suffix counts establishments, the Swedish tail is a group number, and an Austrian UID always starts with U.
Formats by country
The structure column describes what follows the prefix. "Check digits" says whether this tool verifies the checksum or, where no public rule exists for a number type, checks the format only.
| Country | Prefix | Structure | Check digits |
|---|---|---|---|
| Austria | AT | U + 8 digits | weighted sum mod 10 |
| Belgium | BE | 10 digits, starts 0 or 1 | mod 97 |
| Bulgaria | BG | 9 or 10 digits | two weighted schemes |
| Croatia | HR | 11 digits | ISO 7064 MOD 11,10 |
| Cyprus | CY | 8 digits + letter | digit map, mod 26 |
| Czechia | CZ | 8, 9 or 10 digits | mod 11 for companies; personal numbers format only |
| Denmark | DK | 8 digits | weighted mod 11 |
| Estonia | EE | 9 digits | weighted mod 10 |
| Finland | FI | 8 digits | weighted mod 11 |
| France | FR | 2-char key + 9-digit SIREN | numeric keys; letter keys format only |
| Germany | DE | 9 digits, first not 0 | ISO 7064 MOD 11,10 |
| Greece | EL | 9 digits | powers of two, mod 11 |
| Hungary | HU | 8 digits | weighted mod 10 |
| Ireland | IE | 7 digits + 1–2 letters | weighted mod 23 |
| Italy | IT | 11 digits | Luhn |
| Latvia | LV | 11 digits | entities; persons format only |
| Lithuania | LT | 9 or 12 digits | double-pass mod 11 |
| Luxembourg | LU | 8 digits | mod 89 |
| Malta | MT | 8 digits | mod 37 |
| Netherlands | NL | 9 digits + B + 2 digits | mod 11, or mod 97 since 2020 |
| Poland | PL | 10 digits | weighted mod 11 |
| Portugal | PT | 9 digits | weighted mod 11 |
| Romania | RO | 2–10 digits, no leading 0 | weighted mod 11 |
| Slovakia | SK | 10 digits | divisible by 11 |
| Slovenia | SI | 8 digits, first not 0 | weighted mod 11 |
| Spain | ES | 9 chars incl. letter | NIF, NIE and CIF; K/L/M format only |
| Sweden | SE | 12 digits, ends 01–94 | Luhn on the first 10 |
| United Kingdom | GB | 9 or 12 digits, or GD/HA + 3 | mod 97 and mod 9755; not in VIES |
| Northern Ireland | XI | like GB | like GB; still in VIES |
| Switzerland | CHE | 9 digits, suffix MWST/TVA/IVA | weighted mod 11; not in VIES |
What VIES can and cannot do
VIES is not a database. It is a relay: the Commission forwards your query to the member state that issued the number, and returns whatever that national system answers. That design explains all three of its famous behaviours.
First, MS_UNAVAILABLE. When a national database is down for maintenance, every query for that country fails while the other 26 keep working. Anyone who has run batch validations has watched one country vanish for an evening. Second, throttling: the service answers a request at a time per consumer and returns MS_MAX_CONCURRENT_REQ or GLOBAL_MAX_CONCURRENT_REQ when a script hammers it, so a naive loop over 2,000 debtors is exactly the workload it dislikes. Third, no memory: VIES answers for the moment of the query. It cannot tell you whether a number was valid last March when the invoice was written, which is why the consultation number you get for a confirmed query (you must state your own VAT ID to receive one) is worth storing, it is the only evidence of that moment you will ever have.
What VIES does not check at all is structure in any helpful way: a mistyped number simply comes back "invalid", the same word you would get for a real but deregistered one. It will not tell you that your Austrian number has seven digits instead of eight. That gap between "invalid" and "why" is the part this tool covers.
Syntax check vs. registration check
The two checks are routinely confused, including by tools that call a format regex a "VAT validation". They answer different questions and fail in different directions.
The syntax check, format plus check digits, is pure arithmetic and needs no network. Its strength is the direction of certainty: a failure is final. If the ISO 7064 check digit of a German number computes to 6 and the number ends in 9, no registry lookup can save it; someone mistyped it, and the report can even say which kind of slip is plausible. Check digit schemes are designed for exactly these accidents: every single-digit error is caught by all the schemes in the table, and most adjacent transpositions too. In a fresh debtor export, nearly every bad ID is this kind of bad, which is why the offline stage catches the bulk of the problems before a single request is spent.
The registration check has the opposite asymmetry. A VIES "valid" is authoritative for that moment. A VIES "invalid" is ambiguous: typo, deregistration, a freshly issued ID not yet synced, or a national outage misreported by an impatient client. Running syntax first splits those cases cleanly: structurally broken numbers never reach the lookup, and a structurally sound number that VIES rejects is a genuinely interesting case worth a human look, not a retry loop.
Treat the two stages as a funnel with an audit trail. Offline check on every save in the ERP, VIES on onboarding and before zero-rated invoice runs, consultation number into the customer record. Cheap, and each stage does the one thing it is actually able to do.
Reverse charge and the customer's ID
The reason businesses care about any of this is the zero-rating of intra-EU B2B supplies. Deliver goods from Vienna to a company in Hamburg, invoice without Austrian VAT, and the customer self-accounts for German VAT: that construction stands on the customer having a valid VAT ID at the time of supply. Since the 2020 quick fixes amended Article 138 of the VAT Directive, that ID is a substantive condition, not a formality; if it turns out invalid and the supplier cannot show a reasonable verification effort, the supplier owes the VAT plus interest, years later, at the audit.
Honesty about what that means for this tool: an offline pass is not the verification the auditor wants. The proof that counts is the registry confirmation, ideally VIES queried with your own ID stated so a consultation number comes back, stored with a date. The offline check earns its place one step earlier, by making sure the ID you send to VIES, print on the invoice and key into the ERP is at least a number that can exist. A transposed digit found at audit time is expensive; found at data entry it is a red row in a report.
Preflighting a debtor list
The batch mode exists for one recurring situation: a customer master export is about to be imported, migrated or cleaned, and somewhere in those rows are the IDs typed by hand five years ago. Paste the column, one ID per line, up to 5,000 lines. Lines with ; or tab separators are treated as CSV rows and only the first column is read, so a quick copy out of a spreadsheet works without reshaping.
The report is written to be forwarded: every line gets a verdict with the country spelled out, the exact failure reason where there is one, and a notes section listing every repair the normalizer made, every country it had to guess and every duplicate, with line numbers. The stats row on the panel gives the four numbers a migration ticket needs: checked, passed, format-only, failed. Copy or download the whole thing as text. The same export usually has an IBAN column sitting next to the VAT IDs; the IBAN validator runs the equivalent preflight on that one.
And because a debtor list is customer data: the list never leaves this tab. There is no server-side validation step, no VIES call in the background, no logging of what you paste, and the page works the same with the network tab open, which is the check we would run on any online tool before pasting business data into it.
Two algorithms, worked through
Check digit schemes sound more mysterious than they are, so here are the two you are most likely to need by hand, on real structurally valid numbers.
Austria: ATU13585627
Take the 7 digits after the U: 1 3 5 8 5 6 2. Weight them 1, 2, 1, 2, 1, 2, 1 and reduce two-digit products to their digit sum: 1, 6, 5, 16→7, 5, 12→3, 2. The total is 29. The check digit is (96 − 29) mod 10 = 7, and the number ends in 7, so it passes. Change any single digit and the total shifts, which is the entire point of the construction.
Germany: DE136695976
ISO 7064 MOD 11,10 is a running product rather than a weighted sum. Start with product 10; for each of the first eight digits, add it to the product, take mod 10 (a result of 0 becomes 10), double, take mod 11:
| digit | 1 | 3 | 6 | 6 | 9 | 5 | 9 | 7 |
|---|---|---|---|---|---|---|---|---|
| sum (mod 10) | 1 | 5 | 6 | 7 | 2 | 9 | 6 | 8 |
| product (mod 11) | 2 | 10 | 1 | 3 | 4 | 7 | 1 | 5 |
The check digit is 11 minus the final product: 11 − 5 = 6, and the number ends in 6. The scheme catches every single-digit error and every adjacent transposition, which a plain digit sum cannot claim, and that is why Germany and Croatia picked it.
The other 25 countries are variations on these ideas with different weights and moduli; the table above names each one. If a number of yours fails and you want to see the arithmetic, the report quotes both the computed and the actual digit, so recomputing by hand takes a minute.
VAT number questions
Why is VIES not working or returning MS_UNAVAILABLE?
MS_UNAVAILABLE means the national database of the country you queried is not answering; VIES itself is only a relay that forwards each request to the member state. The usual causes are maintenance windows and outages on the national side, so a Spanish lookup can fail while a French one works in the same minute. Retry later, and if you automate lookups, expect the additional throttling faults MS_MAX_CONCURRENT_REQ and GLOBAL_MAX_CONCURRENT_REQ when too many requests arrive at once. The error says nothing about the VAT number itself: a syntax and check digit test still tells you whether the number is worth retrying.
What is the difference between a VAT number syntax check and a VIES check?
A syntax check is arithmetic: it tests offline whether the number matches the country's format and whether its check digits are internally consistent, which proves the number could exist. A VIES check is a live query against the member state's registry and proves the number is actually assigned and currently active. The two answer different questions, and the order matters: a number that fails the syntax check is definitively wrong and needs no lookup, while a number that passes still needs VIES before you rely on it for a zero-rated invoice.
How do I validate a VAT ID without VIES?
Offline, you can verify the format and the national check digit algorithm; every EU country publishes a structure and almost all use a checksum, from ISO 7064 in Germany and Croatia to Luhn in Italy and Sweden. That catches transposed and mistyped digits without any request. What no offline method can tell you is registration status, so for the legally relevant confirmation you still need a registry: VIES for EU numbers, the HMRC checker for UK numbers, the UID register for Swiss ones. German businesses can also request a qualified confirmation of a foreign ID from the BZSt.
What does a German VAT number look like?
DE followed by exactly 9 digits, the first of which is never 0, for example DE136695976. The last digit is a check digit computed with ISO 7064 MOD 11,10 over the first eight. It is a separate number from the Steuernummer that the local Finanzamt assigns for domestic filings; the USt-IdNr. comes from the BZSt and is the one that belongs on intra-EU invoices and in VIES.
What does an Austrian VAT number (ATU number) look like?
AT followed by the letter U and 8 digits, so eleven characters in total, for example ATU13585627. The U is part of every Austrian UID, which is why the numbers are commonly called ATU numbers. The 8th digit is a check digit: the first seven are weighted 1, 2, 1, 2, 1, 2, 1, two-digit products are reduced to digit sums, and the check digit is (96 minus the total) mod 10.
Is a VAT ID the same as a tax number?
No. The tax number identifies you to your own tax office for domestic filings, while the VAT ID (USt-IdNr., UID, TVA intracommunautaire) is issued specifically for cross-border trade inside the EU and is the number VIES knows. A business usually has both, and they look different: in Germany a Steuernummer has 10 to 11 digits in a state-specific pattern, the VAT ID is always DE plus 9 digits. Invoices inside one country typically carry the tax number, intra-EU invoices need the VAT IDs of both sides.
Do I need to check my customer's VAT ID for reverse charge?
Yes. For intra-EU B2B supplies, a valid VAT ID of the customer has been a substantive condition for the zero-rating since the 2020 quick fixes amended Article 138 of the VAT Directive; before that it was treated as a formal requirement in most rulings. If the ID turns out invalid and you cannot show you verified it, the supplier ends up owing the VAT. Practice that holds up in audits: validate the ID when the customer is onboarded, confirm it in VIES with your own ID stated so you receive a consultation number, and store that proof with the invoice.
Why is a UK VAT number no longer in VIES?
Because VIES only covers EU member states, and the UK left the system at the end of the Brexit transition period on 31 December 2020. GB numbers are checked against HMRC's own "Check a UK VAT number" service instead, which also issues a consultation-style proof when you state your own number. The exception is Northern Ireland: under the protocol, goods traders there use the XI prefix, and XI numbers remain queryable in VIES.
How often should I re-validate the VAT IDs in my customer master data?
There is no EU-wide fixed interval, so the cadence comes from risk: an ID proven valid last year can be deregistered today, and the zero-rating depends on it being valid at the time of supply. A common working rule is to validate at onboarding, re-check before every recurring invoice run or at least quarterly for active reverse-charge customers, and always re-check when the name or address on file stops matching. Store the date and consultation number of each confirmation; the check digit part never changes, so structural failures in old data are pure typos worth fixing once.
Can a VAT number pass the check digit test and still be invalid?
Yes, easily. The checksum only proves internal consistency, so a number that was never issued, was deactivated when the business closed, or belongs to someone other than your customer passes the arithmetic all the same. The asymmetry is what makes the offline check useful: a check digit failure is a definitive no and saves the lookup, while a pass only promotes the number to "worth confirming in VIES". Treat the two stages as a funnel, not as alternatives.