Vatline

Spain VAT number format

One letter/digit, 7 digits, then one check character

VIES prefixES
StructureOne letter/digit, 7 digits, then one check character
Pattern^([0-9XYZ])(\d{7})([A-Z])$|^([A-HJ-NP-Z])(\d{7})([0-9A-J])$
Company name via VIESNever
Address via VIESNever
Verified exampleA46103834

Check digit

Two families. Natural persons (NIF): optional X/Y/Z prefix (stands for 0/1/2) + 7 digits + letter = 'TRWAGMYFPDXBNJZSQVHLCKE'[number mod 23]. Organisations: type letter + 7 digits + check character = (10 - alternating-weight sum mod 10) mod 10, as a digit or the letter 'JABCDEFGHI'[n]. Both fully enforced.

Vatline enforces this check locally. A number that fails it is rejected before any call is made to VIES — it protects your quota and keeps the Commission's service healthy.

Watch out for

Expect empty fields. Spain never discloses the company name and the address through VIES. Vatline reports this with name_available and address_available, so your code can tell a normal null from a failure — this is where most integrations break silently.

Check a number

Known-good value: A46103834.

Try the free checker   or get an API key

← All member states