How to use it
- Paste your JSON, or press Example.
- Type what to Find and what to Replace with. Choose whether to change values, keys or both.
- To change only part of the document, enter a JSONPath under Only inside, such as
$.users[*]. - Check the list of changed places, then copy or download the result.
Ways to match
- Part of the text: every occurrence inside a value or key, such as a domain inside e-mail addresses.
- Whole value: only values that are exactly the text, such as the status
draft. - Regular expression: JavaScript rules;
$1in the replacement inserts the first group.
Tick Match case to tell capital letters apart.
Types are kept
Replacing a number or true/false with another number or true/false keeps the type. If the new value is words, it becomes text, and the tool tells you where. Keys are not renamed when the object already has a key with the new name. Values you did not change keep their original spelling, so large numbers keep every digit.
Your input is never changed: the result appears on the right. To find values without changing them, use the JSONPath tester.
Example
Made-up input, and what JSON Search and Replace returns for it.
{
"team": "Web",
"users": [
{
"id": 1,
"name": "Demo User",
"email": "demo@example.com",
"active": true
},
{
"id": 2,
"name": "Test User",
"email": "test@example.com",
"active": false
}
],
"support": "help@example.com"
}{
"team": "Web",
"users": [
{
"id": 1,
"name": "Demo User",
"email": "demo@example.org",
"active": true
},
{
"id": 2,
"name": "Test User",
"email": "test@example.org",
"active": false
}
],
"support": "help@example.com"
}Questions
Can I undo a replacement?
Your input stays as it was, so just change the options or clear the Find box.
Does it work on very large files?
It works on files you can open in the editor, up to 5 MB. Performance near that size has not been measured.