How this works
The generator picks a first digit by type (individual or company), fills the next digits at random, and computes the ninth (the check digit) with the same modulo-11 formula the AT (tax authority) uses. The result passes any NIF validator, but is purely fictitious.
- 1
Pick the type and how many
"Individual" makes numbers starting with 1, 2 or 3; "Company" with 5. You can ask for 1 to 20 at a time.
- 2
The generator computes the check digit
The next seven digits are random. The ninth comes from the mod-11 formula: multiply the first eight by weights 9 down to 2, add up, and the digit is 11 minus the remainder of dividing by 11 (10 or 11 count as 0).
- 3
Copy into your test environment
Copy one number at a time or the whole list. The numbers pass any NIF validator, including ours.
- 4
Use them for testing only
These NIFs belong to no one and should never leave the test environment. Using a NIF that was not assigned to you to identify yourself to third parties or the State is forgery and a crime.
Frequently asked
Are these NIFs real?
No. They are random numbers that only satisfy the check-digit formula. They are meant for testing forms, databases and integrations. They do not correspond to real taxpayers and must not be used as if they did.
What is a NIF generator for?
Developers and QA teams need well-formed NIFs to fill test environments without using real people’s data. Generating fictitious but structurally valid numbers avoids exposing personal data during development.
Can I use one of these to open an account or sign a contract?
No. Using a NIF that was not assigned to you (even a randomly generated one) to identify yourself to third parties or the State is forgery and a crime. These numbers exist only for technical testing.
How is the first digit chosen?
You pick the type: "Individual" starts with 1, 2 or 3; "Company" starts with 5. The remaining digits are random and the last is the modulo-11 check digit.
DISCLAIMER
The generated numbers are fictitious and intended solely for software testing. They belong to no one and may, by coincidence, match a real NIF. Using a NIF that was not assigned to you to identify yourself to third parties or the State is forgery and punishable by law.