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.
Frequently asked questions
Does the generated SSN belong to anyone?
It was not issued and is not registered to anyone. Because the SSA has issued a large share of the valid space, a randomly generated number could coincide with a real one — which is exactly why these belong in test environments and nowhere else.
Is it legal to generate an SSN?
Generating one is legal: it is a number in a valid format, and it exists to test software. Using one to impersonate someone, commit fraud, apply for credit or bypass identity verification is a federal crime, regardless of where the number came from.
Why not use 123-45-6789?
You can, and it is formally valid. But many systems blocklist it precisely because it is the obvious fake, so it fails in a way that tells you nothing about your validation logic. A random number from the issuable range exercises the real path.
Can I tell which state an SSN came from?
Not anymore. The area number encoded the issuing state until June 2011, when the SSA randomized assignment. Any tool that claims to map a modern SSN to a state is reading a pattern that no longer exists.
Is the number sent to a server?
No. The whole thing is computed in your browser, in JavaScript. Nothing generated here leaves your device, is stored anywhere, or passes through a server.
How do I validate an SSN in my own code?
Check the format and the three excluded ranges: area not 000, 666 or 900-999; group not 00; serial not 0000. There is no check digit to verify. Anything beyond that requires the SSA's Consent Based SSN Verification service.