# Redact Social Security numbers

> Redact US Social Security numbers in 3-2-4 format from text, JSON, and CSV. Format-matched, with no model dependency.

Canonical: https://bitbanger.in/entities/ssn
Last updated: 2026-10-27

Category: Identity and government IDs · Entity type: `identity.ssn`

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

```bash
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"}'
```

## FAQ

**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 numbers](https://bitbanger.in/entities/tax-id) — Redact TINs, EINs, and equivalent tax identifiers from invoices, payroll files, and vendor records.
- [National ID numbers](https://bitbanger.in/entities/national-id) — Redact national identity numbers such as NIN, DNI, PESEL, and similar government identifiers.
- [Person names](https://bitbanger.in/entities/person-name) — Redact personal names from free text, including partial names the model only half-captures.

Try it on your own text: https://bitbanger.in/entities/ssn
