Mask Sensitive JSON Fields Locally
100% Valid JSONMask sensitive JSON fields—password, token, secret, auth, email, and SSN—across nested payloads in browser RAM while keeping valid, parseable JSON.
- 100% valid JSON guaranteed
- Key-pattern & deep value scan
- 0 bytes uploaded
Instant Before & After Preview
Key-path masked · valid JSON{
"service": "billing-worker",
"env": "staging",
"user": {
"email": "[email protected]",
"phone": "+1 415-555-0177",
"role": "admin"
},
"auth": {
"apiKey": "sk-live-example-99887766",
"accessToken": "tok_demo_abc123xyz",
"password": "demo-password-42"
},
"retries": 3
}{
"service": "billing-worker",
"env": "staging",
"user": {
"email": "[[JSON-01]]",
"phone": "[[JSON-02]]",
"role": "admin"
},
"auth": {
"apiKey": "[[JSON-03]]",
"accessToken": "[[JSON-04]]",
"password": "[[JSON-05]]"
},
"retries": 3
}How it works
How to anonymize JSON payloads without breaking JSON syntax
Share API payloads in bug reports or generate TypeScript/Zod/TOON schemas without exposing live credentials or customer PII.
- Paste API response or config JSONThe JSON key engine parses your payload recursively in RAM and validates syntax immediately.
- Customize sensitive key patternsDefaults match password, secret, token, apikey, email, phone, ssn, creditCard, and auth—add or remove key patterns anytime.
- Export masked JSON or chain to codegenSend valid masked JSON directly into JSON to TOON, JSON to TypeScript, or JSON Formatter with zero leaks.
FAQ
Frequently asked questions
Will masking nested values or quotes ever produce broken JSON?
No. TxtTo traverses the parsed JSON AST and re-serializes with JSON.stringify so every output stays 100% valid JSON.
What if sensitive PII appears under an unexpected key name like note or bio?
In addition to key-pattern matching, string values are scanned for embedded secrets, emails, cards, and tokens so hidden leaks are also masked.
How does this connect with .env to JSON or JSON Formatter?
Both .env to JSON and JSON Formatter link directly to Mask JSON Sensitive Data in one click via the security pipeline prompt.