CIF / NIF generatorGenerador de CIF
Valid test Spanish company tax code numbers (Código de Identificación Fiscal) for Spain, with the correct structure and check digits. Generate up to 100 at once, copy them or download a CSV, and check any CIF / NIF against the rules. Everything runs in your browser.
- G21180047
- B47582820
- G02449064
- A28474013
- A16973760
- B51198299
- A39732169
- B03498243
- G48082036
- B06155675
Checked in your browser against the published rules. Nothing is sent anywhere, and a valid result does not mean the number was ever issued.
Synthetic test values for software testing. Not issued by any authority and not linked to any person or company.
How a CIF / NIF is built
Pattern: B12345674
Entity letter, two-digit province code, five digits and a control digit or letter (Luhn-style sum).
Valid and invalid example
| Value | Result |
|---|---|
| G21180047 | Valid |
| G21180048 | Invalid last character changed |
About the CIF / NIF
Spanish companies and organisations have a tax code that starts with a letter for the entity type (A sociedad anónima, B sociedad limitada, G association, J civil partnership and so on), followed by a province code, five digits and a control character.
Typical test cases: B2B invoicing, supplier onboarding, Spanish VAT invoices (ES + CIF) and company registration forms.
More sample CIF / NIF numbers
B47582820 · G02449064 · A28474013 · A16973760 · B51198299 · A39732169 · B03498243 · G48082036 · B06155675
Common questions
- Are these real CIF / NIF numbers?
- They follow the published structure and pass the check-digit rule, so validators accept them. They are generated at random and are not taken from any register. A random value can still coincide with a number issued to someone, so use them only in test systems.
- Can I use a generated CIF / NIF on a real application?
- No. Using an identity or tax number that is not yours on a real application, tax return or bank form is fraud in most countries. These values are for developers and testers working on their own systems.
Related tools
- DNI generator: Spanish national identity number
- NIE generator: Spanish foreigner identity number
- Spain address generator: addresses with real cities and postcodes
- Fake Spain profile: name, address, date of birth and ID numbers together
- Test data generator: export profiles with ID columns as CSV, JSON or SQL
Other company ID formats
EIN (US) · UK VAT (GB) · CNPJ (BR) · SIREN / SIRET (FR) · TVA (FR) · Partita IVA (IT) · USt-IdNr. (DE) · ABN (AU) · all formats