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. Most countries also use a check digit; the validator checks both.
Check a Spain VAT number
Include the country prefix. Checked against VIES (EU) and HMRC (UK) in real time.
How to validate a Spain VAT number
- Format: remove spaces, dots and dashes and compare with
^ES[A-Z0-9]\d{7}[A-Z0-9]$. - Check digit: Spain numbers contain a checksum that catches typos. The validator above checks it.
- Registration: only the EU's VIES system can confirm that the number is currently registered for VAT. VIES forwards the question to the Spain tax authority.
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?
Is the Spain VAT number the same as the tax number?
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 with VIES and HMRC, 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=ESA13585625
{
"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",
"checked_at": "2023-01-11T12:30:28.000000Z"
}
}