Support asks for the full log, a forum asks for the stack trace, a contractor needs a sample request. Logs are full of things that should not leave your company: email addresses, card numbers, session tokens, API keys, internal hostnames. The Mask Sensitive Data tool masks email addresses, phone numbers and card numbers in your browser, and you handle the other items by hand, so you can share what is useful and keep the rest private.
Mask Sensitive Data FREE online toolRuns in your browser. No sign-up, nothing to install. Open the tool →What typically hides in a log
- Email addresses and phone numbers in request parameters.
- Payment card numbers, which should never be logged but sometimes are.
- Authorization headers such as Bearer tokens, API keys and session cookies.
- Passwords or reset links in URLs and form data.
- IP addresses, usernames, internal server names and file paths that reveal your setup.
Mask a log in six steps
- Copy only the relevant section of the log rather than the whole file; less data means less risk.
- Paste it into the masking tool and run the masking for the types you need.
- Read the result line by line. Automated masking is a first pass, not a guarantee.
- Search manually for patterns the tool may not know, such as customer IDs, order numbers or internal names.
- Replace anything else by hand with consistent placeholders, such as USER_1 and USER_2.
- Send the masked version, and keep the original in a secure place.
Keep enough to debug
Over-masking makes a log useless. Keep timestamps, error codes, status codes, request paths and stack traces, since those are what the helper needs. For cards, showing only the last four digits is a widely used convention. For emails, you may keep the domain and mask the name, such as ***@example.com, if the domain matters for the bug; the tool also hides most of the domain, so restore it by hand if you need it. Use consistent placeholders, so that the same user appears as the same token across lines and the sequence of events remains clear.
When something already leaked
If a live secret was pasted somewhere public, assume it is compromised. Revoke or rotate API keys, tokens and passwords immediately. Removing a forum post does not erase copies or caches. Review access logs for suspicious use during the exposure window, and tell your security contact. For personal data, check whether data protection rules require you to report the exposure, which depends on your location and the kind of data.
Prevent the problem at the source
Fix the cause as well: configure your application not to log full request bodies, authorization headers or card data. Use log levels sensibly, and consider structured logging with fields that can be redacted automatically. Add a short checklist to your support process: who may share logs, what must be masked, and who approves. A two-minute routine before sending is far cheaper than a breach notification.
A before and after example
Original line: POST /login user=ana.lopez@mail.test card=4111111111111111 Authorization: Bearer eyJhbGciOi... Masked line: POST /login user=***@mail.test card=************1111 Authorization: Bearer [REDACTED]. The request path, method and structure are intact, so a helper can still see which endpoint failed, while no person or credential is identifiable. Do the same for response bodies, which often echo back the data you sent.
Remember the browser advantage
Because the masking runs in the page, the unmasked text is not uploaded to a server while you work. Close the tab when you are done and clear your clipboard if it holds sensitive text. Do the same on shared computers, since the clipboard may be readable by other programs.
Comments (0)
No comments yet. Be the first to share a thought.