TOOLS / ID & MONEY

NIF Generator (test data)

NIF Generator — test data only

Generates fictitious tax numbers with a valid check digit, to fill test environments without using real people’s data. These numbers are not real.

· UPDATED JUNHO 2026 ·2 MIN ·OFFICIAL SOURCES
Particular Empresa
5 +
RESULTADO

    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 tax authority uses. The result passes any NIF validator, but is purely fictitious.

    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.
    OFFICIAL SOURCES
    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.