Redact email addresses from text
Exactemail_redactDeterministic and authoritative — the canonical answer for this input.
Mask an email for safe display or logging. Keeps the first `keep_prefix` characters of the local part and the domain visible; every other local-part character is replaced with one asterisk, so the output is never longer than the input. Example: '[email protected]' with keep_prefix=1 → 'a****@example.com'. `keep_prefix` is capped so at least one local-part character is always masked. Input with no recognizable email shape is fully masked (keep_prefix does not apply on that fallback) and reported with `email_shaped: false` at reduced confidence (0.5). Processing multiple inputs? Use `email_redact_batch` to do up to 1000 in one call.
Parameters
valuestringrequiredEmail to redact.
keep_prefixintegeroptionalCall it
curl -X POST https://api.snipget.ai/v1/email/redact \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"value":"[email protected]","keep_prefix":1}'The Batch tab sends up to 1000 inputs in one call via /v1/email/redact/batch.
Example response
{
"input": "[email protected]",
"redacted": "a****@example.com",
"email_shaped": true
}FAQ
Why use this instead of hiding the email myself?
It masks the address in one consistent, predictable way so support tickets, logs, and screenshots never leak a full email. The domain stays visible so you can still tell Gmail from a work address, while the name is hidden.
Does it scan a whole paragraph and find every email in it?
No. It masks the one email address you pass in, it does not search a block of text for addresses. Send each email value separately, or use the batch version for a list.
Will the same email always come out the same way?
Yes. This is an exact, deterministic tool, so the same input always produces the same masked output. It is the canonical answer, not a guess, and it is one-way: you cannot recover the original from the masked version.
Can I show more of the name?
Yes. The keep_prefix option sets how many leading characters of the name stay visible (default 1). For example keep_prefix 2 turns '[email protected]' into 'al***@example.com'. keep_prefix is capped so at least one character is always masked: asking to keep the whole local part still hides its last character, and a one-character local part is fully masked.
What happens if I pass something that is not an email?
It does not error. A value with no @ sign is not a recognizable email, so it comes back as a fully masked placeholder (keep_prefix does not apply on that fallback) with email_shaped false and reduced confidence (0.5), so nothing sensitive slips through; an empty value returns an empty string.