SSN Generator
Random Social Security Numbers that respect the ranges the SSA actually issues, for testing forms and databases.
987-65-4320 through 4329 will never be assigned to anyone. They are also rejected by strict validation, because 900-999 was never issued.
An SSN has no check digit
This trips up anyone used to national ID numbers that end in a computed digit. A Social Security Number has no checksum at all. There is no arithmetic you can run on the first seven digits to derive the last two, which means no form can prove an SSN is genuine without asking the SSA.
What a form can check is the range. Certain blocks were never issued and never will be, so a number inside them is definitively invalid. That is the whole of offline SSN validation.
The ranges that were never issued
The SSA has published these, and they hold for every SSN regardless of when it was assigned:
- Area (first three digits) of 000, 666, or anything from 900 to 999
- Group (middle two) of 00
- Serial (last four) of 0000
One thing that is no longer true, and that plenty of blog posts still repeat: the area number used to indicate the state where the card was issued. Since the SSA randomized assignment in June 2011, it indicates nothing. Any tool claiming to tell you where an SSN came from is reading a pattern that stopped existing.
Why the demo range is off by default
The SSA reserves 987-65-4320 through 987-65-4329 for advertising and training material. Those ten numbers will never belong to anyone, which sounds like exactly what a test generator should produce.
Except they sit inside the 900-999 block that was never issued. They are provably fake and therefore invalid, so a form with strict validation rejects them. A generator that returned only those numbers would be useless for testing the success path of a sign-up flow, which is what most people need. So the default is a number from the issuable ranges, and the demo range is one switch away.