jsonlkit.com
JSONL (JSON Lines) utilities, in the browser
Say hi →

Rename JSONL Keys

updated 16 August 2026

One rule per line, applied to every record. Rename a field a schema change left behind, strip a prefix off a whole family of keys with a regular expression, or drop keys outright. Collisions — two different keys arriving at the same new name — are counted rather than silently resolved, because that is exactly the case where a bulk rename quietly loses data.

Rename

Drop a .jsonl file here, or Up to 1 GB · in your browser

Literal rules and pattern rules

By default the left side is an exact key name: user_id=userId renames that key and nothing else. Tick regular expressions and the left side becomes a pattern tested against each key, with $1-style backreferences available on the right. ^meta_(.*)=$1 strips a prefix from every key that has it. _at$=_timestamp rewrites a suffix. Rules are tried in order and the first match wins, so put the specific ones above the general ones.

Both modes rename keys only. Values are carried across untouched, including nested objects and arrays — this never reshapes a record, only relabels it. To change the style of every key at once rather than name them individually, Key case converts the whole file to camelCase, snake_case or kebab-case in one pass.

Collisions are the thing to watch

A record with both email and user_email, and a rule renaming the second to the first, now has one key and two candidate values. JavaScript objects cannot hold both, so one is lost. This counts every such case and lets you decide which survives; if the count is above zero and you did not expect it, stop and look at the records involved before you use the output.

Recursive applies rules at every depth, which is usually right for normalising a naming convention and wrong when the same key name means different things at different levels — a top-level id and a nested tag.id, for instance. Turn it off to touch only the outermost object.

Privacy

Nothing is uploaded. The whole thing runs in this tab, in your own browser. That matters here more than on most tool sites — training data is usually the most sensitive file a team owns.

Frequently asked questions

Can I rename a nested path like user.email specifically?

Not with a path — rules match key names, wherever they occur. To target one nesting level only, turn off recursive so just the top-level keys are considered, or restructure with Flatten, rename the flattened user.email key, and unflatten again.

What if a rule matches no keys at all?

Nothing happens and the rename count stays where it is. A rule that you expected to fire and did not usually means a typo or a case difference — key matching is case-sensitive in literal mode.

Does the key order change?

Original order is preserved; a renamed key stays in its old position. That keeps diffs against the source file readable.

Can I use it to drop keys instead?

The drop box takes a comma-separated list, applied at every depth when recursive is on. For path-precise removal, or for keeping an allowlist instead, use Keep or drop fields.

Related tools