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