← Back to blog

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

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:

CountryPrefixFormatExample
AustriaATU9 charactersATU12345678
BelgiumBE10 digitsBE0123456789
BulgariaBG9-10 digitsBG123456789
CroatiaHR11 digitsHR12345678901
Czech RepublicCZ8-10 digitsCZ12345678
DenmarkDK8 digitsDK12345678
EstoniaEE9 digitsEE123456789
FinlandFI8 digitsFI12345678
FranceFR2 chars + 9 digitsFR12345678901
GermanyDE9 digitsDE123456789
GreeceEL9 digitsEL123456789
HungaryHU8 digitsHU12345678
IrelandIE8-9 charactersIE1234567A
ItalyIT11 digitsIT12345678901
LatviaLV11 digitsLV12345678901
LithuaniaLT9 or 12 digitsLT123456789
LuxembourgLU8 digitsLU12345678
MaltaMT8 digitsMT12345678
NetherlandsNL12 charactersNL123456789B01
PolandPL10 digitsPL1234567890
PortugalPT9 digitsPT123456789
RomaniaRO2-10 digitsRO1234567890
SlovakiaSK10 digitsSK1234567890
SloveniaSI8 digitsSI12345678
SpainES9 charactersESX1234567A
SwedenSE12 digitsSE123456789012

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)

  1. Go to euvat.dev/app?tab=validate
  2. Enter the VAT number in the validation field (with or without the country prefix)
  3. Click “Validate”
  4. The tool queries VIES in real time and returns:
    • Whether the number is valid or invalid
    • The registered company name
    • The registered address
  5. 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.

  1. Select the member state from the dropdown
  2. Enter the VAT number (without the country prefix — the dropdown handles that)
  3. Submit the query
  4. 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:

  1. Newly registered number — New VAT registrations can take 1-2 weeks to appear in VIES after being issued by the national authority.

  2. Recently deregistered — The business may have been involuntarily deregistered due to non-compliance or voluntarily deregistered.

  3. 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
  4. 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