GUIDE · LOGS
How to redact logs before pasting them into ChatGPT
A stack trace is the best thing you can give an AI to debug with. It is also full of things that should not leave your company.
What a normal log leaks
2026-10-11 14:02:13 ERROR billing-worker request failed user=anna.keller@example.com ip=10.24.3.17 headers={"Authorization": "Bearer eyJhbGciOi..."} card=4111 1111 1111 1111 TimeoutError: upstream did not respond in 30s
Only the last line is needed to debug this. Everything above it is personal data or a credential.
Redaction checklist
- Tokens and auth headers: Bearer and Basic headers, cookies, JWTs, API keys.
- Personal data: emails, phone numbers, names, addresses, national ID numbers.
- Payment data: card numbers, IBANs, account numbers.
- Infrastructure: internal IP addresses, hostnames, bucket names, connection strings.
- Request bodies: often contain everything above at once. Cut them unless the bug is in the body.
Keep what the AI needs
Keep timestamps, error types, file names, line numbers and the order of events. Replace values with typed placeholders such as [EMAIL_1] and [IP_ADDRESS_1] rather than deleting them, so the model can still follow which request belongs to which user.
Is it allowed at all?
Many companies now have an AI usage policy. If yours does not, the free policy template in the AI Paste Safety Kit is a one-page starting point. Under GDPR and similar laws, sending customer personal data to a third-party AI service may need a legal basis and a data processing agreement, so masking first is the simpler path.
Mask it in one paste. The free Hushpaste tool finds keys, tokens, emails, IBANs and other secrets in your text and swaps them for placeholders, right in your browser. Nothing is uploaded. When the AI answers, paste the reply back and the real values return.
Open the free tool