Redact Social Security numbers from text, JSON, and CSV
An SSN is the single most damaging identifier to leak from a US dataset, and it has a fixed shape. Redactly detects it with a format pattern that does not depend on surrounding context.
How Redactly detects Social Security numbers
- Matched by regex for three digits, two digits, and four digits separated by hyphens.
- Runs independently of the model, so an SSN in a bare cell or a JSON value is still found.
- The format is specific enough that an SSN is not usually confused with another identifier.
Why redact Social Security numbers?
SSNs are the core input to identity theft and are regulated as sensitive data in most US state privacy laws.
Example request
curl -X POST https://api.bitbanger.in/v1/redact \
-H "X-API-Key: rdct_your_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "Employee record: Jane Doe, SSN 123-45-6789, started 2026-03-02.", "style": "replace"}'
Every hit in the response carries entity, text, start, and end. The offsets index into the text you sent, so you can apply the redactions to your own copy of the document. The full response schema is in the API reference.
Questions
Does Redactly redact Social Security numbers automatically?
Yes. Send text to the API and every detected type is redacted, including Social Security numbers. To redact only this type, pass the value identity.ssn in the entities filter. No training or configuration is required.
What happens to Social Security numbers after redaction?
With style set to replace, each match becomes [identity.ssn] — the entity type in square brackets. Setting style to mask replaces every character with a block character, and remove deletes the span entirely.
Related entity types
- Tax identification numbersRedact TINs, EINs, and equivalent tax identifiers from invoices, payroll files, and vendor records.
- National ID numbersRedact national identity numbers such as NIN, DNI, PESEL, and similar government identifiers.
- Person namesRedact personal names from free text, including partial names the model only half-captures.
Redact Social Security numbers in production
Get an API key and send your first request in a minute. Plans start at $24/month.
See pricing