Redact Social Security numbers from text
Exactidentifiers_ssn_redactDeterministic and authoritative — the canonical answer for this input.
Mask a US Social Security Number, keeping only the last 4 digits visible in the canonical '***-**-NNNN' format. Input without a recognizable SSN shape (exactly nine digits) — including an empty value — comes back as the fully-masked placeholder '***-**-****' with `ssn_shaped: false` at reduced confidence (0.5). Processing multiple inputs? Use `identifiers_ssn_redact_batch` to do up to 1000 in one call.
Parameters
valuestringrequiredSSN to redact.
Call it
curl -X POST https://api.snipget.ai/v1/identifiers/ssn/redact \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"value":"123-45-6789"}'The Batch tab sends up to 1000 inputs in one call via /v1/identifiers/ssn/redact/batch.
Example response
{
"input": "123-45-6789",
"redacted": "***-**-6789",
"ssn_shaped": true
}FAQ
Why use this for Social Security numbers?
It returns the standard masked SSN format, '***-**-6789', so you can confirm identity by the last four digits without storing or showing the full number. It accepts the SSN with or without dashes.
Does it pull SSNs out of a document or paragraph?
No. It masks the single SSN value you pass in, it does not scan free text. Send one SSN per call, or use the batch version for a list.
Is the result consistent every time?
Yes. This is an exact, deterministic tool, so the same SSN always masks the same way. It is the authoritative result and it is one-way, so the mask cannot be turned back into the full number.
Are there any options to set?
No. SSN masking always keeps the last four digits and hides the rest, so there is nothing to configure. Just pass the value.
What if the value is not a 9-digit SSN?
It does not error. Anything that is not exactly nine digits, including an empty value, comes back as the fully masked placeholder '***-**-****', so a malformed value never leaks. Either way ssn_shaped is false and the response confidence drops to 0.5 so you can tell 'I masked an SSN' from 'this was not an SSN'.