Free tool

Spanish NIF, NIE and CIF validator

Type a Spanish tax ID (NIF, NIE or CIF) and know instantly whether its control letter or digit checks out, with the calculation explained. Everything runs in your browser: the number is never sent to any server. Note: it validates the FORMAT, it does not query official registries.

Checked in your browser: the number is never sent to any server.

How it works

  1. 1Type the numberDNI (12345678Z), NIE (X1234567L) or CIF (B12345674).
  2. 2Official math, instantlyModulo-23 letter for NIF/NIE and the control sum for CIF.
  3. 3With the explanationIf it doesn't match, we tell you which letter or digit it should be.

Get the free website checklist

Plus practical tips to grow your business online. No spam, unsubscribe anytime.

Frequently asked questions

Is the number stored or sent anywhere?
No. The check runs entirely in your browser; the number never leaves your device.
Does it verify the person or company exists?
No: it validates the format and control math; it does not query the tax census or the companies registry.
How is the NIF letter computed?
It's the remainder of dividing the number by 23, mapped to the official table TRWAGMYFPDXBNJZSQVHLCKE.
Why would my business need this?
To catch typos before issuing an invoice or onboarding a client: a failing control digit usually means a miscopied number.