Free · Unlimited checks · No signup

Spain TIN validator

Check whether a Spain NIF / NIE / CIF follows the expected structure before you save it, send it to an API, or include it in a tax workflow.

Private by design

Your data stays in your browser

None of the TIN data you enter is ever saved to our servers — validation runs entirely on your device.

Validation Workspace

Validate NIF / NIE / CIF

Enterprise checks for Spain tax identification numbers.

Instant one-by-one format validation

Spain

Country

Spain

Type

Private · NIF / NIE / CIF

Awaiting input

8 digits + 1 letter (NIF), or letter + 7 digits + letter (NIE)

Try a sample private NIF / NIE / CIF to verify format compliance.

How Spain tax IDs are formatted

In Spain, the tax identifier is commonly known as Número de Identificación Fiscal (NIF / NIE / CIF). The expected format is 8 digits + 1 letter (NIF), or letter + 7 digits + letter (NIE). Teams usually need a Spain NIF / NIE / CIF check around tax declarations, employment, property purchases, or before a record moves into billing, onboarding, or compliance review.

Valid examples

  • 12345678Z
  • X1234567L

Invalid examples

  • 12345678A (Invalid check letter)
  • X123456 (Too short)

What this validator checks

Format and length

Confirms the number follows the expected Spain pattern: 8 digits + 1 letter (NIF), or letter + 7 digits + letter (NIE).

Useful examples

Shows valid and invalid-looking samples so you can compare spacing, separators, letters, and digit counts before submitting real data.

Letter placement

Checks letter positions where the NIF / NIE / CIF format requires alphabetic prefixes, suffixes, or program identifiers.

When people usually check this number

  • Tax declarations
  • Employment
  • Property purchases
  • Banking

A format match does not prove that a Spain tax ID belongs to a specific person or business. Use the result as a first-pass data quality check, then confirm sensitive cases with official records.

Official source: Agencia Tributaria

Last reviewed: May 23, 2026. We update country guidance when public format rules change.

How to check a Spain NIF / NIE / CIF

Use this check before a record reaches billing, tax reporting, or manual review.

1

Enter the NIF / NIE / CIF

Paste or type the Spain tax identifier exactly as it appears in your source record. Spaces and separators are fine when they are part of the expected format.

2

Review the format result

Check whether the number matches the known Spain structure, including length, separators, letters, and checksum rules where public guidance includes them.

3

Confirm important records

For onboarding, tax reporting, or compliance work, treat the result as a data-quality signal and confirm high-risk records with Agencia Tributaria or your internal process.

Frequently asked questions

Get started today

Ready to validate at scale?

Start with 1,000 free validations per month, or talk to us about enterprise volume and custom integrations.

No credit card required · Cancel anytime