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?
How do I check a Spain VAT number?
Do Spain VAT numbers have a check digit?
What is the most common mistake with Spain VAT numbers?
What is the VAT rate in Spain?
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": []
}