Spanish CIF generator (valid company tax IDs)
A valid CIF (Spanish company tax ID) has 9 characters: a letter for the organization type, 7 digits (the first two are the province) and a check character, digit or letter depending on the entity type, calculated with a weighted sum and mod 10. CIFs generated by DataMockSeed are fake and match no real company.
The CIF combines an organization type letter, the province, a number and a check character that can be a digit or a letter depending on the entity type.
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)4112295
- 2Weighted sum (odd ×2 adjusted, even as is)27
- 3Check digit = (10 − sum mod 10) mod 103
- 4Check character3
Frequently asked questions
Why do some CIFs end in a letter and others in a number?
It depends on the first letter, which indicates the organization type: P, Q, R, S, N and W always take a check letter; A, B, E and H (such as public and private limited companies) always take a digit; the rest accept both.
Do the generated CIFs belong to real companies?
No. The number and the check character are fictitious; only the format and the calculation follow the official algorithm.
Can I generate CIFs for a specific organization type?
Yes. In the full generator you can set the document subtype to “cif” and combine it with other company fields.
Keep exploring
Looking for more data types? Try the full generator.