JSON structure redactor
Replace all JSON scalar values or explicit object keys with a mask while retaining the document structure and a value-free path report.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Prepare a structural sample for debugging or a support request. Choose the values to replace yourself, review the remaining content, then share the redacted document.
How to use this tool
- Paste JSON or open a local file, then choose all scalar values or exact object keys.
- Set the mask. For exact keys, enter a JSON string array such as ["token","email"]. Check case and nested keys.
- Review the replacement count and paths, inspect retained keys/values, then download the redacted JSON and path report.
Supported inputs and limits
One UTF-8 JSON file or pasted document up to 1 MiB. A selected file takes precedence. Parsing rejects duplicate keys, malformed JSON, depth above 128 or more than 200,000 nodes. Pointer report budget is 8 MiB; conservative redacted-output budget is 20 MiB. Preview includes up to 200 replacements.
All-scalars mode replaces strings, numbers, booleans and null with the mask string; object keys and array/object containers remain. Exact-keys mode uses a nonempty JSON array of up to 1,000 case-sensitive key names and replaces each matching key’s entire value, including a container.
The mask may have up to 200 Unicode code points. Unselected numbers retain their original lexical text without floating-point rounding. Reports contain only replacement counts, JSON Pointer paths and original types, never stored original values. Keys and paths remain visible, so inspect them before sharing.
This tool does not detect PII, secrets or credentials automatically. Exact-key mode can leave sensitive values under other keys, and all-scalars mode changes value types. Keep the original locally and review the complete downloaded result.
Worked example
Example input
{"name":"Ada","items":[12,null],"empty":{}}Example options
{"params": {"strategy": "all-scalars", "mask": "[redacted]"}, "secondary": "[\"token\",\"email\"]"}Example output
{
"name": "[redacted]",
"items": [
"[redacted]",
"[redacted]"
],
"empty": {}
}When something does not work
Fix JSON syntax or duplicate keys. Exact-key mode requires a nonempty string array; check case if there are zero matches. Shorten the mask to 200 code points and remove a selected file before using pasted JSON.
Frequently asked questions
Does it find every secret automatically?
No. You select the scope. A structural sample still needs manual inspection before sharing.
What happens to an object under a selected key?
The entire object is replaced by one mask. The report shows that key’s pointer and original object type, without walking the removed contents.
Will numbers be rounded?
Unselected numbers keep their original text. Selected numbers become a mask string, as shown in the result.
Documentation & further reading
Related tools
JSON formatting workspace
Format or minify strict JSON, sort object keys, and encode or decode strings while preserving raw number tokens.
Regex tester
Try a pattern and see what it matches in your text.
Compare text
See what changed, side by side.
HTML formatter
Format HTML indentation so its structure is easier to read.