Search & Replace in JSON / JSONL (Regex)
JSONL find and replace. String or regex replace across every record in a JSONL (JSON Lines) file. Scope to all keys or one key path, optional case-insensitive. Up to 1 GB, runs in your browser.
100% client-side. No upload.
Find & Replace
JSONL Find & Replace
Bulk find-and-replace across every record in a JSONL file. Replace inside all string values, in one key path only, or on the raw text line-by-line (handy for fixing escaped sequences or surgical sed-style edits). String or regex mode, optional case-insensitive, optional whole-word. 100% in-browser.
Three scopes, three use cases
All string values
Walks every record, descends into nested objects and arrays, and replaces inside any
string value (keys are never touched). Use this for "rename every reference to
old-domain.com with new-domain.com" across a whole dataset.
Specific key path
Restricts the search to one path (dotted, e.g. user.email or
meta.tags.0). Useful when the same string appears in multiple fields but you
only want to change one (e.g. update an internal ID without touching a user-visible
display name).
Raw text (whole line)
Treats the file as plain text and applies the replacement to each line. Doesn't parse JSON, so it can edit keys, values, structure — anything. Use carefully: a careless raw replace can break JSON syntax.
Regex notes
- Standard JavaScript regex syntax — no flags in the pattern; toggle case-insensitive via the checkbox.
- Use capture groups and
$1,$2in the replacement. - Use
$&to insert the whole match. - To insert a literal
$, write$$.
Tips & common pitfalls
- Watch the scope. "All string values" is almost always what you want. Raw mode can corrupt JSON if your pattern matches structural characters.
- Numbers stay numbers. Replace mode doesn't touch numeric values. If you need to change
"id": 1to"id": 2, use raw mode or the visual editor. - Backups. No undo. Run on a copy first, or copy the output instead of overwriting your file.
Before you start
Find & replace works across every record in a JSONL file. You choose the scope (all keys, or a specific key path) and the match style (literal string or regex).
How to use it
- Paste or drop your JSONL.
- Type the Find string and the Replace string.
- Pick the scope: All values or a specific key path like
user.email. - Optionally tick Regex (JS-flavoured) or Case-insensitive.
- Click Replace and download.
Examples
- Normalise domains: find
@example.com, replace with@example.orgacross all values. - Strip a prefix: find
^https?://staging\.(regex), replace withhttps://prod., scopeurl. - Anonymise IPs: find
\b\d+\.\d+\.\d+\.\d+\b(regex), replace with0.0.0.0.
Tips & common pitfalls
- Scope to a key when you can. Blind "all values" replacements often hit fields you didn't intend (a literal "true" inside a comment, for instance).
- Test on a sample first. Run the Sampler to grab 100 rows, do the replacement, eyeball the result, then run on the full file.
- Use the Anonymizer for built-in PII patterns — it knows the common shapes already.
Frequently asked questions
Does it work on keys, or only values?
Only values. To rename a key, use the jq query playground with .foo = .bar | del(.bar).
What regex flavour?
JavaScript regex. \d, \w, \b, character classes, capturing groups all work.