Spanish VAT number check in VIES

Check whether a Spanish VAT number (ES + CIF) is registered for intra-EU trade before you invoice without VAT. VIES does not show names for Spain, so for companies we add the legal name and status from the Commercial Registry Gazette (BORME).

Try:
  • Live check in VIES (European Commission)
  • +4.7 M Spanish companies on record
  • 5 free checks a day

Format

What a Spanish VAT number looks like

A Spanish VAT number is ES + the 9-character tax ID (NIF). There is no separate VAT number: the Tax Agency activates the same NIF for intra-EU operations when the business registers in the ROI (register of intra-Community operators).

WhoTax IDVAT numberExample
Company (SL, SA…)CIF: a letter, 7 digits and a check characterES + CIFESA46103834
Self-employed, Spanish nationalDNI: 8 digits and a letterES + DNIES12345678Z
Self-employed, foreign residentNIE: X, Y or Z, 7 digits and a letterES + NIEESX1234567L

The first letter of a company CIF tells you its legal form: A for a public limited company (SA), B for a private limited company (SL). See Spanish company types. To check only that the number is well formed, without VIES, use the Spanish NIF validator.

Reading the result

Valid, not valid, and what to do next

  1. 1

    Valid in VIES

    The number is registered for intra-EU trade today. Compare the legal name we show with the name on the order: VIES will not do that for you in Spain.

  2. 2

    Not valid in VIES

    The NIF may still be correct but not registered in the ROI. Ask the customer to register, or charge Spanish VAT. A not valid result is not proof that the company does not exist: look at its status.

  3. 3

    Company not active

    If the status is dissolved, insolvent or struck off, stop and check before you ship or extend credit. See what each status means.

What VIES does not tell you

  • The name and address of a Spanish trader: Spain does not share them.
  • Whether the company is dissolved or insolvent. A number can stay valid for a while.
  • Who can sign for the company. Directors are in the BORME.
  • A consultation number, unless you check on the official site and enter your own VAT number.

FAQ

Frequently asked questions

What is the format of a Spanish VAT number?

ES followed by the Spanish tax ID (NIF), with no spaces: 11 characters in total. For a company it is ES + its CIF, for example ESA46103834. For a self-employed person (autónomo) it is ES + their DNI or NIE, for example ES12345678Z or ESX1234567L.

Is the Spanish VAT number the same as the CIF?

Yes, the number is the same: the VAT number is the company tax ID (NIF, still often called CIF) with the ES country prefix. What changes is the registration: a company can have a perfectly valid NIF and still not be registered for intra-EU trade, in which case VIES says the VAT number is not valid.

Why does VIES say a real Spanish company is not valid?

Usually because the company is not registered in the Spanish register of intra-Community operators (Registro de Operadores Intracomunitarios, ROI). Spanish companies have to ask the Tax Agency for it in their census declaration; many that only sell in Spain never do. It can also be a temporary outage of the Spanish VIES service: if the check fails, try again later.

Does VIES show the name and address of a Spanish company?

No. Spain does not share the trader’s name or address through VIES: you only get valid or not valid. That is why this page also shows the legal name and status the company has in the Commercial Registry Gazette (BORME), so you can compare it with the name on the order or invoice.

Do I need a valid VAT number to invoice a Spanish business without VAT?

For intra-EU supplies of goods, yes: since 2020 the customer’s valid VAT number, registered in VIES, is a substantive condition for the VAT exemption, and the supply must appear in your recapitulative statement. For services, the reverse charge also relies on the customer acting as a business, and a valid VAT number is the usual proof. Check the rules with your tax adviser.

How do I keep proof that I checked a VAT number?

On the official VIES website, enter your own VAT number as the requester: the result then includes a consultation number you can keep as evidence of the check and its date. This page and the API show the result, but do not issue that consultation number.

Can I check many Spanish VAT numbers at once?

Yes, with the API. GET /companies/verify with vat=true checks one company in VIES together with its status, name and directors. POST /companies/verify/batch with vat=true checks up to 20 VAT numbers per call (VIES is slow), and without VIES up to 1,000 tax IDs.

Check VAT numbers from your own system

One API call returns the VIES result together with the company’s status, legal name, directors and a pass / review / fail hint. Batches of up to 20 VAT numbers per request. 100 free calls, no card required.

Get free API key
🤖
Asistente IA En línea
¡Hola! Soy el asistente de APIEmpresas. ¿En qué puedo ayudarte hoy?