Spanish CIF validator: verify the check digit
A CIF (Spanish company tax ID) is valid if its last character matches the check computed from its 7 digits: add the even positions, double the odd ones (summing the digits of each result), and the check is 10 minus the last digit of the total (0 if it is 0). This CIF validator runs in your browser, without querying the Mercantile Registry.
Paste a CIF and we check the weighted sum of its digits and whether the final check character is consistent.
Quick validator
Check whether a DNI, NIE, CIF, IBAN, card number, NSS or CCC has a valid format and check digit.
The validator checks format and check digits. It does not check whether the document or account exists. The value is never sent to any server or stored in the URL.
How it's calculated
Organization type letter + province + number + check digit or letter depending on the type.
Weighted sum of the 7 digits (province + number): odd positions are doubled.
- 1Province + number (7 digits)2975484
- 2Weighted sum (odd ×2 adjusted, even as is)47
- 3Check digit = (10 − sum mod 10) mod 103
- 4Check letter (JABCDEFGHI table)C
Frequently asked questions
Does the CIF validator identify the company?
No. It detects that the format is a CIF and checks its control character, but it does not query the Mercantile Registry or identify the specific company.
What is the CIF weighted sum?
It is the sum of the 7 middle digits of the CIF, with odd positions doubled (adding up the digits of the result); it is the basis for calculating the check character.
Can a valid CIF not actually exist?
Yes. A CIF can have a correct check character without that company being registered; the validator only checks the algorithm.
Keep exploring
Need to validate another data type? Use the full validator.