Format guidance · Verified checks when available

Spain TIN validator

Review the expected Spain NIF / NIE / CIFstructure before you save it, send it to an API, or include it in a tax workflow. Interactive validation appears only after this country's rules pass authoritative-source verification.

Private by design

Transient validation, no public history

TINs are sent securely to the canonical validation API, processed in real time, and not persistently stored by the public checker.

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 page covers

Format details below are guidance from public sources. Automated pass/fail results are offered only when the backend catalog marks this country as verified syntax.

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 Spain syntax currently implemented here. The result does not query a tax-authority registry or confirm ownership.

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