JSON guide · 2 min read
Working with Sensitive JSON Safely
Handle tokens, customer data, configuration and logs safely when formatting, validating, sharing or debugging JSON.
Developer JSON often contains sensitive data
API captures, logs and configuration can include bearer tokens, email addresses, internal hostnames, database identifiers and customer records. Classify a payload by its contents, not by the fact that it is simply a JSON file.
Prefer local processing for inspection tasks
Formatting, syntax validation and structural inspection often do not require an upload to an application server. Local browser processing removes one unnecessary data-transfer step and is a useful default for internal payloads.
Local processing does not remove every risk
Clipboard history, screenshots, browser extensions, downloaded files and operating-system history sit outside the application-server boundary. Sensitive data can still leak through those channels even when a web tool never uploads the payload.
Redact before sharing
Replace credentials, tokens, personal information and private identifiers with realistic placeholders. Preserve only the structure and types needed to reproduce the problem.
Before:
{"email":"real.person@example.com","token":"eyJ..."}
Safer reproduction:
{"email":"user@example.test","token":"REDACTED"}Use synthetic data for structural bugs
A missing delimiter, nested-array problem or schema mismatch can usually be reproduced with fabricated values. Synthetic examples are safer to post in tickets and are often easier for another developer to understand.
Clean up generated artifacts
Formatted copies, exported CSV files and screenshots can outlive a debugging session. Avoid committing sensitive fixtures and delete temporary artifacts when they are no longer needed.
Primary sources
References and specifications
- OWASP Logging Cheat Sheet
Practical guidance on avoiding sensitive-data exposure in application logs.
Common questions
Frequently asked questions
Is browser-local processing automatically safe for secrets?
It reduces one data-transfer risk, but clipboard history, extensions, screenshots and downloaded copies still require normal security hygiene.
What should I redact from a JSON bug report?
Tokens, passwords, API keys, personal information, private URLs and identifiers that are not needed to reproduce the issue.
Should production JWTs be shared for debugging?
No. Inspect them locally and share redacted or synthetic examples instead whenever possible.