Log Sanitizer Without Uploading
Redact PII Before It Leaves Your Machine
What online log sanitizers do with your files, what your logs actually contain, and why client-side processing is the only safe approach.
Log sanitizer without uploading: the only safe way to redact PII from a log file is a tool that processes everything in your browser — because a sanitizer that uploads your log to a server to clean it has just sent the sensitive data you wanted to remove to a third party, which is exactly the problem you were trying to solve.
The Irony of Server-Side Log Sanitizers
Think about the sequence of events with a server-side sanitizer:
You've solved the problem downstream (the person you share the log with doesn't see the PII) while creating a larger problem upstream (a server you don't control now has a copy of everything you were trying to protect).
What Your Log Files Actually Contain
Developers often underestimate how much sensitive data accumulates in logs. A typical web application log will contain some or all of these:
Tool Comparison
| Feature | Server-side sanitizers | ResourceCentral Log Sanitizer | CLI (sed / grep) |
|---|---|---|---|
| Log processed client-side | ✗ | ✓ | ✓ |
| No file sent to a server | ✗ | ✓ | ✓ |
| Works offline | ✗ | ✓ | ✓ |
| Emails, IPs, API keys detected | varies | ✓ | ✗ |
| JWT & session token detection | varies | ✓ | ✗ |
| Custom pattern support | varies | ✓ | ✓ |
| No install required | ✓ | ✓ | ✗ |
| Handles large files (>100 MB) | varies | ✓ | ✓ |
| Verifiable via DevTools | ✗ | ✓ | ✓ |
| HIPAA / GDPR safe by design | ✗ | ✓ | ✓ |
Sanitize Logs Without Any Tool
For targeted one-off redaction on the command line:
# Redact email addresses
sed -E 's/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/[EMAIL]/g' app.log
# Redact IPv4 addresses
sed -E 's/\b([0-9]{1,3}\.){3}[0-9]{1,3}\b/[IP]/g' app.log
# Redact Authorization header values (Bearer tokens, API keys)
sed -E 's/(Authorization: Bearer )[^\s]+/\1[TOKEN]/g' app.log
# Chain multiple patterns
cat app.log \
| sed -E 's/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/[EMAIL]/g' \
| sed -E 's/\b([0-9]{1,3}\.){3}[0-9]{1,3}\b/[IP]/g' \
| sed -E 's/(Authorization: Bearer )[^\s]+/\1[TOKEN]/g' \
> app.redacted.log
Or in Python, which handles larger files more gracefully and gives you more control over patterns:
import re, sys
PATTERNS = [
(re.compile(r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'), '[EMAIL]'),
(re.compile(r'\b(?:\d{1,3}\.){3}\d{1,3}\b'), '[IP]'),
(re.compile(r'Bearer [A-Za-z0-9\-._~+/]+=*'), 'Bearer [TOKEN]'),
(re.compile(r'[A-Za-z0-9\-_]{20,}\.[A-Za-z0-9\-_]+\.[A-Za-z0-9\-_]+'), '[JWT]'),
]
with open(sys.argv[1]) as f:
for line in f:
for pattern, replacement in PATTERNS:
line = pattern.sub(replacement, line)
print(line, end='')
How to Verify a Browser Tool Is Truly Client-Side
Compliance Context
For teams working under HIPAA or GDPR, the processing location matters legally — not just operationally:
Sanitize Logs in Your Browser — Nothing Uploaded
Emails, IPs, API keys, JWTs, session tokens and custom patterns. Works offline. Verify in DevTools: zero POST requests.
Open Log Sanitizer →