Spain NIF Validator

Validate Spanish Tax ID Number

Enter a Spanish Tax ID Number (NIF/NIE/CIF) to verify its validity.

About this Validator

This tool validates Spanish Tax Identification Numbers according to official requirements.

The validator checks if a given NIF follows the correct structure based on the entity type and verifies its control character.

This validation only confirms if a number follows the correct format. It does not verify if the number is actually registered with Spanish tax authorities.

What is a NIF (Número de Identificación Fiscal)?

NIF Structure (9 characters): 1. Spanish Citizens (DNI): • Format: 99999999L • 8 digits + control letter 2. Foreigners (NIE): • Format: X/Y/Z9999999L • Initial letter (X/Y/Z) • 7 digits + control letter 3. Legal Entities (CIF): • Format: L9999999C • Entity type letter • 7 digits + control character Special Cases: • Non-resident Spaniards: L9999999L • Residents under 14: K9999999L • Temporary foreigners: M9999999L

Validation Features: • Format identification • Type verification • Length validation • Control character check • Pattern compliance

Used for: • Tax purposes • VAT transactions • Business operations • Legal identification • Financial services • Official documents

Important Notes: • Multiple formats • Entity specific • Tax administration • Official identifier • Legal requirement

If you need to generate a NIF for testing purposes, here is a Spain NIF Generator