Hide JSON Strings
Replace all string values in JSON with masked or hidden text while preserving the structure
Paste any JSON and instantly mask every string value — swap them for asterisks, [HIDDEN], empty strings, or your own custom placeholder. Keys, numbers, booleans, and structure all stay untouched so the output is still valid, parseable JSON you can share or commit without leaking secrets. And everything runs in your browser. Nothing gets uploaded.
How It Works
The parser reads your JSON and walks through every key-value pair recursively. When it finds a value that’s a string type, it swaps the content with your chosen replacement text. Integers, booleans, arrays, and object structures pass through untouched — so the output is still valid JSON you can actually use for testing or documentation.
Examples
Scrubbing a User Profile for Bug Reports
You’re attaching a JSON response to a Jira ticket but don’t want real user data in it.
{
"name": "Sarah Chen",
"email": "[email protected]",
"role": "admin",
"active": true,
"loginCount": 847
}
{
"name": "***",
"email": "***",
"role": "***",
"active": true,
"loginCount": 847
}
Masking API Credentials in a Config File
Sharing your app config as a template without leaking secrets. Using [HIDDEN] replacement mode here.
{
"database": {
"host": "db.internal.prod",
"password": "xK9#mP2$vL"
},
"stripe_key": "sk_live_abc123",
"debug": false,
"maxRetries": 3
}
{
"database": {
"host": "[HIDDEN]",
"password": "[HIDDEN]"
},
"stripe_key": "[HIDDEN]",
"debug": false,
"maxRetries": 3
}
Cleaning an Array of Customer Records
Got a JSON array with 500 customer objects? Works on arrays just the same — every string in every object gets masked.
[
{"id": 1, "phone": "+1-555-0142"},
{"id": 2, "phone": "+44-20-7946"}
]
[
{"id": 1, "phone": "***"},
{"id": 2, "phone": "***"}
]
Who Uses This
Strip secrets from JSON configs before committing example files to version control.
Sanitize API responses before pasting them into incident reports or Slack threads.
Create documentation samples with realistic structure but no real user data.
Attach sanitized request/response payloads to bug tickets without exposing PII.
Common Mistakes
A trailing comma or unquoted key will cause a parse error. Run your JSON through a formatter or validator first if you’re getting errors.
If a phone number is stored as "5550142" (a string), it gets hidden. But if it’s stored as 5550142 (a number), it won’t be. Check whether your sensitive numeric data is actually typed as strings in the original JSON.
Keys like "ssn" or "password" stay visible unless you uncheck "Keep keys." That’s usually what you want — but if the key names themselves are sensitive, toggle that option off.
Technical Details
- Processing: 100% client-side — JSON never leaves your browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Max Input Size: Limited only by your browser’s memory (tested up to 10 MB)
- Output Format: Valid JSON with original indentation preserved
Frequently Asked Questions
How do I hide JSON string values online?
Paste your JSON into the input box, pick a replacement style (asterisks, [HIDDEN], empty string, or custom text), and hit the Hide button. The output keeps your keys and structure but every string value is replaced. Done in one click.
Does this tool upload my JSON to a server?
No. All processing happens locally in your browser using JavaScript. Your data is not sent anywhere — there’s no server involved at all. Close the tab and it’s gone.
Can I hide only specific keys instead of all strings?
This tool masks all string values at once. If you need selective hiding — say, only "email" and "password" fields — you’d have to do a find-and-replace on the output or write a quick script. For most use cases though, blanking everything is actually safer since you won’t accidentally miss a field.
What’s the difference between fixed-length and match-length masking?
Fixed length replaces every string with the same short mask like "***". Match length generates asterisks equal to the original string’s character count — so "hello" becomes "*****". Match length is useful when the length of the value matters for your testing, but it does reveal how long the original data was.
Is the output still valid JSON after hiding strings?
Yes — always. The replacement text gets properly quoted as a JSON string value. You can paste the output directly into a JSON validator, an API testing tool, or a config file and it’ll parse without errors.