How to Validate EU VAT Numbers (VIES Guide)
If you sell to businesses in the EU and apply the reverse charge (zero-rate VAT), you are legally required to verify that your customer’s VAT number is valid and active. The official way to do this is through VIES — the VAT Information Exchange System operated by the European Commission.
This guide explains what VIES is, how to use it, what to do when it fails, and how to automate the process.
What Is VIES?
VIES stands for VAT Information Exchange System. It is a free online service run by the European Commission that lets anyone check whether a VAT identification number is registered in an EU member state’s national database.
When you query VIES, it does not maintain its own database. Instead, it sends a real-time request to the national tax authority of the relevant country (e.g., the Bundeszentralamt fur Steuern for German VAT numbers) and returns the result.
This means VIES answers are authoritative — they reflect the current status in each country’s official records.
Why Validation Matters
Legal Requirement
Under EU VAT Directive 2006/112/EC, you must verify a customer’s VAT number before applying the reverse charge mechanism to cross-border B2B sales. If you zero-rate a transaction based on an invalid number, you may be held liable for the unpaid VAT.
Fraud Prevention
VAT fraud costs the EU an estimated 50-60 billion euros per year. The most common schemes involve fake or stolen VAT numbers used to purchase goods without paying VAT. Validating numbers before each transaction is a basic due diligence step.
Audit Protection
Tax authorities can audit your VAT records and require proof that you verified each customer’s number at the time of the transaction. Keeping validation records (date, time, result, company name returned) provides evidence of due diligence.
VAT Number Formats
Every EU VAT number starts with a two-letter country prefix followed by a country-specific sequence of digits and sometimes letters:
| Country | Prefix | Format | Example |
|---|---|---|---|
| Austria | ATU | 9 characters | ATU12345678 |
| Belgium | BE | 10 digits | BE0123456789 |
| Bulgaria | BG | 9-10 digits | BG123456789 |
| Croatia | HR | 11 digits | HR12345678901 |
| Czech Republic | CZ | 8-10 digits | CZ12345678 |
| Denmark | DK | 8 digits | DK12345678 |
| Estonia | EE | 9 digits | EE123456789 |
| Finland | FI | 8 digits | FI12345678 |
| France | FR | 2 chars + 9 digits | FR12345678901 |
| Germany | DE | 9 digits | DE123456789 |
| Greece | EL | 9 digits | EL123456789 |
| Hungary | HU | 8 digits | HU12345678 |
| Ireland | IE | 8-9 characters | IE1234567A |
| Italy | IT | 11 digits | IT12345678901 |
| Latvia | LV | 11 digits | LV12345678901 |
| Lithuania | LT | 9 or 12 digits | LT123456789 |
| Luxembourg | LU | 8 digits | LU12345678 |
| Malta | MT | 8 digits | MT12345678 |
| Netherlands | NL | 12 characters | NL123456789B01 |
| Poland | PL | 10 digits | PL1234567890 |
| Portugal | PT | 9 digits | PT123456789 |
| Romania | RO | 2-10 digits | RO1234567890 |
| Slovakia | SK | 10 digits | SK1234567890 |
| Slovenia | SI | 8 digits | SI12345678 |
| Spain | ES | 9 characters | ESX1234567A |
| Sweden | SE | 12 digits | SE123456789012 |
Note that Greece uses the prefix “EL” rather than “GR” — this is the most common source of format errors.
How to Validate: Step by Step
Method 1: Using euvat.dev (Quickest)
- Go to euvat.dev/app?tab=validate
- Enter the VAT number in the validation field (with or without the country prefix)
- Click “Validate”
- The tool queries VIES in real time and returns:
- Whether the number is valid or invalid
- The registered company name
- The registered address
- Save the result for your records
The lookup typically takes 1-3 seconds. If a specific country’s database is temporarily unavailable, the tool will indicate that.
Method 2: European Commission VIES Website
The official VIES portal at ec.europa.eu/taxation_customs/vies/ provides direct access to the validation service.
- Select the member state from the dropdown
- Enter the VAT number (without the country prefix — the dropdown handles that)
- Submit the query
- Review the result
The official site is reliable but can be slow during peak business hours (9:00-17:00 CET), especially for countries with high query volumes like Germany and France.
Method 3: API Integration
For automated validation in your checkout flow, invoicing system, or CRM, you can call the VIES service programmatically:
// Using euvat.dev API
const response = await fetch('https://euvat.dev/api/v1/validate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ vat_number: 'DE123456789' })
});
const result = await response.json();
// { valid: true, name: "Example GmbH", address: "Berlin, Germany" }
The European Commission also offers a SOAP-based API, though it is more complex to integrate. Several third-party libraries wrap it for popular languages (Node.js, Python, PHP, Ruby).
Common Errors and How to Handle Them
”Service unavailable” for a specific country
Each EU country maintains its own VAT database. VIES queries these databases in real time, so if a country’s service is down, validation for that country’s numbers will fail.
Countries with the most frequent downtime:
- Italy — Regular scheduled maintenance windows
- Spain — Occasional outages, especially during tax filing periods
- Greece — Intermittent availability
What to do: Wait 15-30 minutes and try again. If the service remains unavailable, document your validation attempt (screenshot with timestamp) and proceed with the transaction. Retry validation within the next business day and add the result to your records.
”Invalid” result for a known-valid number
Several things can cause a false negative:
-
Newly registered number — New VAT registrations can take 1-2 weeks to appear in VIES after being issued by the national authority.
-
Recently deregistered — The business may have been involuntarily deregistered due to non-compliance or voluntarily deregistered.
-
Format error — The most common mistakes:
- Missing country prefix (entering “123456789” instead of “DE123456789”)
- Extra spaces or special characters
- Using “GR” instead of “EL” for Greece
- Including dashes or dots that are not part of the number
-
Wrong country prefix — The customer may have provided a domestic tax number rather than their VAT identification number. In some countries, these are different.
What to do: Double-check the format, try again without spaces or special characters, and confirm with the customer that they provided their VAT identification number (not a different tax reference).
Timeout errors
VIES queries can time out if the national database responds slowly. This is more common during peak hours.
What to do: Retry after a few minutes. If building an automated system, implement retry logic with exponential backoff (wait 2 seconds, then 4, then 8).
Best Practices
1. Validate at the point of sale
Do not wait until invoicing to check VAT numbers. Validate when the customer first provides the number — during checkout, at account creation, or when they request B2B pricing.
2. Re-validate periodically
VAT registrations can be revoked at any time. For recurring customers (subscriptions, regular orders), re-validate quarterly. Some businesses re-validate monthly for high-value accounts.
3. Store validation evidence
For each validation, save:
- The VAT number checked
- The date and time of the check
- The result (valid/invalid)
- The company name and address returned
- The source (VIES, euvat.dev, etc.)
EU tax authorities require these records and may request them during audits. The standard retention period is 10 years.
4. Handle failures conservatively
If VIES is down and you cannot validate a number:
- Charge VAT on the transaction at the applicable rate
- Validate the number as soon as the service is available
- If the number turns out to be valid, issue a credit note and refund the VAT
This approach protects you legally. Applying the reverse charge without validation is a risk you carry, not the customer.
5. Automate where possible
Manual validation works for a few transactions per week. For anything more, integrate VIES validation into your systems:
- E-commerce checkout: Validate during the checkout flow and show B2B pricing only for valid VAT numbers
- Invoicing software: Auto-validate before generating invoices with reverse charge
- CRM: Validate when adding new business contacts and flag expired registrations
euvat.dev provides a straightforward API for integration, or you can use the official VIES SOAP service directly.
After Validation: What Goes on the Invoice
When you have confirmed a valid VAT number and apply the reverse charge, your invoice must include:
- Your VAT number
- The customer’s validated VAT number
- The note “Reverse charge: VAT to be accounted for by the recipient” (or equivalent in the local language)
- No VAT amount charged
Missing any of these elements can cause problems during audits on either side.
Summary
VAT number validation is not optional for B2B EU cross-border sales — it is a legal requirement that protects you from liability. Use euvat.dev for quick manual checks, integrate the API for automated workflows, and always keep records of every validation you perform. When in doubt, charge VAT and sort it out later — that is always the safer path.
Try EU VAT Calculator for free
Calculate VAT, validate VAT IDs, and look up rates for all 27 EU member states. No signup required.
Open Calculator