Skip to content

Free · No sign-up · Nothing stored

Check an EU VAT number in VIES

EU VAT number (VIES)

With or without the two-letter country code: ESA28015865, DE123456789…

Want a consultation number as proof? (optional)

If you add it, VIES returns a consultation number that identifies this check. It is also sent to the Commission and we do not store it either.

When you check, we send the country and number to the European Commission through our server. We do not store it.

The check tells you whether the number is active in VIES today. For your records, keep the official proof of the check (see below).

Type your customer's or supplier's VAT number. We check the format in your browser against each country's official structure and, when you press the button, check it in VIES, the European Commission system that queries each Member State's register.

The format is checked in your browser. To query VIES, the country and number go through our server to the European Commission. We do not store or log them.

What it checks

What this tool tells you (and what it does not)

  • Format, in your browser: whether the number has the prefix and structure the European Commission publishes for that country. For Spain, also whether the letter of an individual's NIF matches.
  • Validity, in VIES: whether the Member State reports the number as active for intra-EU transactions today. VIES cannot confirm validity in the past (VIES FAQ, question 6).
  • Name and address: only if the country provides them. Spain does not.
  • What it does not say: that the operation is exempt. The VIES disclaimer states the result «does not in itself give a right to exempt» (disclaimer).

How it works

What VIES is

VIES (VAT Information Exchange System) is the European Commission search engine for EU VAT numbers. It is not a database: each query is forwarded to the national database of the country that issued the number (VIES FAQ, question 23). «Invalid» means the number is not active or not allocated (VIES help).

If VIES fails

What to do if VIES does not answer (MS_UNAVAILABLE)

VIES codeMeaningWhat to do
MS_UNAVAILABLEThe Member State (or Northern Ireland) service is unavailableTry again later. It does not mean the number is wrong
TIMEOUTThe country did not answer in timeTry again later
MS_MAX_CONCURRENT_REQ, GLOBAL_MAX_CONCURRENT_REQToo many simultaneous requestsWait and retry
INVALID_INPUTCountry or number format is not validCheck prefix and number
Source: official VIES error texts and the REST API Swagger.

National databases stop for backups; the Spanish one «is unavailable daily around 06:30 AM for a few minutes» (VIES FAQ, question 14).

Proof

Keeping proof: the consultation number

If you enter your own VAT number as requester, VIES returns a unique consultation number you can use to show a tax administration that you checked the number on that date. The Commission notes it is only one of the elements of evidence (VIES help). Open «Want a consultation number as proof?» in the tool above.

Format

VAT number format in each EU country

Always the two-letter country code, in capitals and without spaces or dots. Greece uses EL, not GR, and Northern Ireland uses XI. Spanish VAT numbers are the Spanish NIF with «ES» in front (Royal Decree 1065/2007, art. 25); Spain does not return name or address in VIES (VIES FAQ, question 22).

PrefixCountryAfter the prefixShape
ATAustriaU + 8 digitsATU12345678
BEBelgium10 digits (starting with 0 or 1)BE0123456789
BGBulgaria9 or 10 digitsBG123456789
CYCyprus8 digits + 1 letterCY12345678X
CZCzechia8, 9 or 10 digitsCZ12345678
DEGermany9 digitsDE123456789
DKDenmark8 digitsDK12345678
EEEstonia9 digitsEE123456789
ELGreece9 digits (prefix EL, not GR)EL123456789
ESSpain9 characters: the Spanish NIF; the first or last is a letterESA28015865
FIFinland8 digitsFI12345678
FRFrance2 characters (digits or letters) + 9 digitsFR12345678901
HRCroatia11 digitsHR12345678901
HUHungary8 digitsHU12345678
IEIreland8 or 9 characters (digits and 1 or 2 letters)IE1234567WA
ITItaly11 digitsIT12345678901
LTLithuania9 or 12 digitsLT123456789
LULuxembourg8 digitsLU12345678
LVLatvia11 digitsLV12345678901
MTMalta8 digitsMT12345678
NLNetherlands12 charactersNL123456789B01
PLPoland10 digitsPL1234567890
PTPortugal9 digitsPT123456789
RORomania2 to 10 digitsRO1234567890
SESweden12 digitsSE123456789001
SISlovenia8 digitsSI12345678
SKSlovakia10 digitsSK1234567890
XINorthern Ireland9 or 12 digits, or GD/HA + 3 digitsXI123456789
Source: VIES FAQ (European Commission), checked on 22/11/2026. Examples show the shape, not real numbers, except the Spanish one. See the source

Code

Check VIES from your own software

The Commission publishes a free REST API: POST /check-vat-number with countryCode and vatNumber; add requesterMemberStateCode and requesterNumber to get a requestIdentifier (technical information, Swagger).

check-vies.js · JavaScript
// Check an EU VAT number in VIES (official European Commission REST API).
// From your SERVER: the API does not accept browser requests from other sites (CORS).
async function checkVies(country, number) {
  const r = await fetch(
    "https://ec.europa.eu/taxation_customs/vies/rest-api/check-vat-number",
    {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ countryCode: country, vatNumber: number }),
      signal: AbortSignal.timeout(12000),
    },
  );
  const json = await r.json();
  // Member State down: { actionSucceed: false,
  //   errorWrappers: [{ error: "MS_UNAVAILABLE" }] }  → try again later
  const error = json.errorWrappers?.[0]?.error;
  if (error) throw new Error(error);
  return json; // { valid, name, address, requestDate, requestIdentifier, ... }
}

await checkVies("ES", "A28015865"); // { valid: true, name: "---", ... }

VIES blocks IPs that check the same number many times a day or send lots of invalid numbers, and its disclaimer forbids extracting and redistributing its data.

FAQ

VIES frequently asked questions

What is VIES?

The European Commission search engine for EU VAT numbers. It forwards each query to the national register of the issuing country.

What does MS_UNAVAILABLE mean?

That the Member State's service is not responding right now. It does not mean the number is wrong: try again later.

Why is there no name for Spanish companies?

Spain does not provide name or address to VIES. It only confirms whether the number is valid.

Can I check whether a VAT number was valid in the past?

No. VIES only confirms validity on the day of the check, so keep the consultation number.

Why does Greece use EL instead of GR?

That is the prefix VIES uses for Greece. GR fails; use EL with the same number.

Do you store the number I check?

No. The format is checked in your browser. To query VIES the number goes through our server to the European Commission, but it is not stored or logged.

About

About this validator

Built by Black Wings, a software studio in Valencia (Spain) working with small and medium businesses. Our validators are free, single-purpose tools that show how we work.

  • Check: the official VIES REST API of the European Commission, check-vat-number.
  • Formats: the VIES FAQ table.
  • Not an official service and not affiliated with the European Commission or the Spanish Tax Agency.
  • Reviewed: 22 November 2026.

Privacy

What happens to the number you check

Unlike our IBAN and DNI validators, this one sends the number. While you type, the format is checked in your browser. When you press «Check in VIES», the country and number go to our server (hosted on Vercel) and from there to the European Commission. If you add your own VAT number for a consultation number, it is sent too.

We do not store or log the number or the result. Your IP address is used only in memory to rate-limit requests. More in our privacy policy.

Other validators

More free validators

Need this inside your own software?

Validating IBANs and tax IDs when a customer signs up, checking whole lists or connecting invoicing to the bank: that is the kind of work we do at Black Wings.

Tell us about it