Número de Identificación Fiscal (NIF-IVA)

Spain VAT number format

Spain VAT numbers (NIF) are written as ES + 9 characters: a letter or digit, 7 digits, a letter or digit, for example ESA13585625.

Country code
ES
Format
ES + 9 characters: a letter or digit, 7 digits, a letter or digit
Example
ESA13585625
Local name
Número de Identificación Fiscal (NIF-IVA)
Register
VIES (EU)
Standard VAT rate
21%

Regular expression

^ES[A-Z0-9]\d{7}[A-Z0-9]$

Checks the format only. The validator below also checks the check digit where the number has one it can compute.

Check a Spain VAT number

Include the country prefix. EU numbers are checked against VIES in real time, UK numbers with a separate live check.

How Spain VAT numbers are built

ES followed by 9 characters, the NIF. Companies start with a letter for the legal form (A for a sociedad anónima, B for a sociedad limitada, …), then 7 digits and a check character. Individuals have 8 digits and a letter (DNI), or X, Y or Z, 7 digits and a letter (NIE).

Check digit

The last character is a check digit or letter. The validator checks the check digit of company numbers that end in a digit and the structure of the others.

Common mistakes

  • A Spanish NIF is only valid in VIES once the business is entered in the ROI, the register of intra-community operators.
  • VIES confirms Spanish numbers but returns no name or address for them.

Is the number registered?

A valid format and check digit only mean the number could exist. Whether it is currently registered for VAT is known to the Spanish Tax Agency (Agencia Tributaria, AEAT), and VIES asks that register for you. VIES confirms Spain numbers but returns no name or address for them.

Check a Spain number with the validator above, in the VAT number checker, or up to 50 at once with the bulk VAT validator.

Check Spain VAT numbers by API

curl "https://api.vatcheckapi.com/v2/check?vat_number=ESA13585625" -H "apikey: YOUR-API-KEY"

The response says whether the format and checksum are valid and whether the number is registered, with name and address where Spain provides them.

Frequently asked questions

What does a Spain VAT number look like?

ES followed by 9 characters, the NIF. Companies start with a letter for the legal form (A for a sociedad anónima, B for a sociedad limitada, …), then 7 digits and a check character. Individuals have 8 digits and a letter (DNI), or X, Y or Z, 7 digits and a letter (NIE). The local name is Número de Identificación Fiscal (NIF-IVA) (NIF), for example ESA13585625.

How do I check a Spain VAT number?

Enter it in the validator on this page. It checks the format and check digit and asks the EU's VIES system whether the number is registered, but Spain returns no company name or address through VIES. The vatcheckapi API does the same from your code.

Do Spain VAT numbers have a check digit?

The last character is a check digit or letter. The validator checks the check digit of company numbers that end in a digit and the structure of the others.

What is the most common mistake with Spain VAT numbers?

A Spanish NIF is only valid in VIES once the business is entered in the ROI, the register of intra-community operators.

What is the VAT rate in Spain?

The standard rate is 21%. See VAT rates in Spain for reduced rates and a calculator.

Other countries

VAT validation API

Validate VAT numbers in your app

vatcheckapi checks the format and checksum of EU and UK VAT numbers and confirms the registration live (VIES for EU numbers), with company name and address where the country provides them.

/v2/check documentation VAT number API All documentation

150 free validations every month. No credit card required.

GET https://api.vatcheckapi.com/v2/check?vat_number=LU26375245

{
  "country_code": "LU",
  "vat_number": "26375245",
  "format_valid": true,
  "checksum_valid": true,
  "registration_info": {
    "is_registered": true,
    "name": "AMAZON EUROPE CORE S.A R.L.",
    "address": "38, AVENUE JOHN F. KENNEDY\nL-1855  LUXEMBOURG",
    "address_parts": null,
    "checked_at": "2026-10-16T09:12:44.000000Z"
  },
  "registration_info_history": []
}

Free VAT, EORI and IBAN tools

Start using our VAT validation API for free today

Get 150 validations / month for free