US Social Security Number

Detects US Social Security Numbers (SSNs) in both formatted (XXX-XX-XXXX) and unformatted (XXXXXXXXX) representations. The pattern excludes invalid SSN ranges including area numbers 000, 666, and 900-999, group numbers 00, and serial numbers 0000, in accordance with SSA assignment rules. SSNs are critical PII used across healthcare, financial, and government contexts.

Type
regex
Engine
boost_regex
Confidence
high
Confidence justification
The pattern enforces SSA-defined exclusion rules for invalid area, group, and serial numbers, significantly reducing false positives. Combined with corroborative keyword proximity, this provides high-confidence detection of genuine SSNs.
Detection quality
Verified
Jurisdictions
us
Regulations
CCPA/CPRA, GLBA, HIPAA, SOX
Frameworks
ISO 27001, ISO 27701, PCI-DSS
Data categories
pii, phi, government-id
Scope
narrow
Risk rating
9
Platform compatibility
Purview: Compatible, GCP DLP: Unsupported, Macie: Unsupported, Zscaler: Compatible, Palo Alto: Unsupported, Netskope: Unsupported

Pattern

\b(?!000|666|9\d{2})\d{3}[-\s](?!00)\d{2}[-\s](?!0000)\d{4}\b

Corroborative evidence keywords

social security, SSN, social security number, SS#, soc sec, ID number, identification, ID card, license, permit, registration, certificate, address, age, birthday, citizenship, city, date of birth, DOB, email (+21 more)

Proximity: 300 characters

Should match

Should not match

Known false positives

Collections