Mask sensitive text before sharing
Logs and pastes carry emails, cards, and IPs — redact the patterns before the snippet leaves your hands.
Tools used in this guide
The job
A support paste with someone's email and card number is a small breach. Redaction swaps the matching spans for a mask — ██████ blocks, [KIND] labels such as [EMAIL], [CARD], [IPV4], [URL], [PHONE], or a custom string — so the structure stays readable while the secrets leave.
Categories, style, custom words
Pick which pattern classes to mask, choose the mask style (blocks, [KIND] labels, or a custom string), and add literal words (a name, an API key prefix, a project codename) to the custom list. The output preserves spacing and punctuation and reports per-kind counts.
Worked example
In label style, 'mail alice@ex.com or 090-1234-5678, card 4242424242424242 from 192.168.0.1 https://ex.com' becomes 'mail [EMAIL] or [PHONE], card [CARD] from [IPV4] [URL]' — order matters: cards and IPs get classified before the broader phone pattern can eat their digits.
Where it stops
Pattern matching is best-effort — a phone written with spaces, or a token that only looks like a card, will fool it in both directions. Always read the masked output once before sharing; do not use this as sole compliance for regulated data.