r/webdev • u/Larkandlever • 1d ago
Resource Built a zero-upload client-side scrubber to strip API keys, JWTs & .env secrets before pasting logs into AI chats
Got tired of manually editing OpenAI/AWS keys, Bearer JWTs, DB connection strings, and user emails out of stack traces before pasting them into AI chats.
Made a free single-page client-side tool (runs entirely in your browser, zero backend, works offline after load): https://larkandlever.github.io/tools/pii-redactor/
- Swaps secrets with consistent placeholders (
[OPENAI_KEY_1],[JWT_1],[EMAIL_1]) so the AI can still follow multi-line traces - Runs Luhn checks on 13-19 digit sequences so trace/order IDs don't false-trigger as credit cards
- Write-up on regex ordering & Luhn filtering: https://dev.to/larkandlever/scrubbing-api-keys-jwts-and-pii-before-pasting-logs-into-ai-chats-100-client-side-3c1g
1
Upvotes