Back to Library
Validation

US SSN

Matches US Social Security Numbers (XXX-XX-XXXX).

Pattern
^(?!000|666|9\d\d)\d{3}-(?!00)\d{2}-(?!0000)\d{4}$

Test Cases

123-45-6789 Match
000-00-0000 No Match

Try it Live

Test and customize this pattern in our interactive editor

Open in Editor