Scrub emails, phones, card numbers, and IPs from logs & JSON — quickly, locally, and reliably.
Email, phone, credit card (Luhn), IPv4/IPv6, IBAN.
Load JSON/YAML
custom patterns. Bonus pack includes JWT, UUID, AWS keys, MAC, API keys, and more.
mask
, tag
, or hash
(with -salt
). Optional JSON report of counts.
Text and JSON (walks nested values), streams or files. Single static binary; runs 100% offline.
# Redact a file (mask mode by default)
ghostredact -in server.log -out clean.log
# JSON-aware redaction (tag mode)
ghostredact -in sample.json -format json -mode tag -out clean.json
# From stdin to stdout
cat dump.txt | ghostredact -mode tag > clean.txt
# Counts report (JSON) written to file
ghostredact -in server.log -report report.json
# Use custom patterns (JSON/YAML)
ghostredact -in logs.txt --custom patterns.json -mode tag
mask
(****), tag
(<EMAIL>, <PHONE>), or hash
.txt
, .log
, .json
, and streams (stdin/stdout)Status: Active