Almost every developer I know has caught themselves doing this at 11 PM while debugging a production issue:
You copy a stack trace, a .env snippet, or a customer webhook payload — manually replace a couple of secrets with XXXX — and paste it into ChatGPT or Claude.
There are two problems with manual redaction:
- It is easy to miss one secret (a
postgres://password buried in line 42, a Bearer JWT, or a customer email/IBAN). - Replacing everything with
XXXXbreaks coreference. If two log lines refer to two different users or two different databases, turning both intoXXXXconfuses the LLM and hurts the debugging answer.
I didn't want to send raw production logs to another cloud redaction proxy just to make them safe for an LLM — so I built ContextScrub, a 100% client-side browser tool that runs strictly in local browser RAM with zero server uploads.
What It Does Locally (Zero Network Requests)
You can open DevTools → Network tab (or disconnect your Wi-Fi after loading the page) and paste the built-in incident log sample to verify zero outbound traffic:
1. Deterministic Secret & PII Detection
Instead of running a flaky regex over everything, ContextScrub combines structured pattern rules with validation checks:
- Cloud & API secrets: AWS (
AKIA...), Stripe (sk_live_.../sk_test_...), GitHub (ghp_...,github_pat_...), OpenAI, Anthropic, JWTs, PEM private key blocks, and.envassignments - Infrastructure:
postgres://,mysql://,mongodb+srv://,redis://connection strings and IPv4 addresses - PII & financial data: Emails, phone numbers, SSNs, IBANs, and Luhn-validated credit card numbers (so 16-digit order IDs or timestamps don't trigger false positives)
2. Reversible Indexed Placeholders + Local Re-hydration
Rather than wiping values into generic XXXX, ContextScrub maps identical secrets to deterministic indexed tokens:
-
alice.martin@acme-fintech.com→[EMAIL_1] -
postgres://admin:secret@db.internal:5432/prod→[DB_URL_1] -
sk_live_...→[API_KEY_1]
The LLM keeps full structural understanding of which user and service failed. Once ChatGPT or Claude gives you a fix or SQL query containing [EMAIL_1] / [DB_URL_1], you can paste the AI's reply back into ContextScrub to restore your real values offline in one click.
3. Token Bloat Trimmer (40–75% Smaller Prompts)
Raw logs, HTML documentation, and giant JSON payloads burn context window tokens fast. ContextScrub also cleans noise locally before you copy:
- Converts messy HTML pages (stripping
<script>,<style>, navs, and footers) into clean Markdown - Deduplicates repeated log lines into compact summaries (
[×4 repeated]) - Truncates massive repetitive JSON arrays while preserving schema
- Exports ready-to-paste Markdown, Claude XML (
<documents>), orllms.txt
Try It Free (No Signup)
The core scrubber, HTML/log/JSON compressor, token counter, and multi-file bundler (up to 2 files) are free with no account required:
👉 https://contextscrub.pages.dev/
(I also built a companion browser screen-demo tool, ClipFrame Studio, for recording smooth-zoom demos locally on Windows/Linux/Mac.)
I'd love developer feedback: what secret formats, log frameworks, or custom redaction patterns should I add next?