Built on advanced on-device AI and hardware acceleration to deliver professional-grade performance with uncompromising privacy.On-device AI — professional-grade, fully private.
JSON Key Remover
Remove JSON keys by name, wildcard, regex or path
- Runs on your device, not our servers
- Numbers keep their exact value
- Names, wildcards, regex or paths
- Preview matches before removing
Drop a JSON file here
One file up to 25.0 MB · .json, .jsonl, .ndjson, .geojson, .txt
Or paste JSON
One click. A preset replaces the current rules.
* is any run of characters: temp*, *_id, *secret*.
Applies to name, wildcard and regex rules. Paths already state their depth.
Returns your own file minus the removals — same indentation, same line endings.
Free: one document up to 25.0 MB. Every matching mode, Keep, Redact and every preset are included.
How to remove keys from JSON
- 1Paste or drop your JSONPaste JSON into the box or drop a .json, .jsonl, .ndjson, .geojson or .txt file. It is read on your device and never uploaded. Every unique key is catalogued immediately — how often it appears, which value types it holds, where it first occurs and a sample value.
- 2Tick the keys you want goneOpen the Keys tab and tick any key in the list. Use the search box to narrow a long list, and Select All, None or Invert to work in bulk. Ticked keys are matched by exact name.
- 3Or type a patternChoose Exact, Wildcard, Regex or Path in the settings and type one rule per line, or several separated by commas. Wildcard understands temp*, *_id and *secret*. Path understands user.email and data[].id, which target one place in the document rather than every key with that name.
- 4Or click a presetNine one-click presets cover the usual clean-ups: remove nulls, empty strings, empty arrays, empty objects, everything falsy, or every key beginning with _, __, $ or @. A preset replaces the current rules rather than adding to them.
- 5Check the count before you run itThe settings rail shows how many keys match and how many places they occupy, updated as you type. Nothing has changed yet — this is the number you are about to remove.
- 6Choose what happens to a matchRemove deletes the key. Keep inverts the rule so only matching keys survive, with the whole subtree of a match intact. Redact leaves the key in place and replaces its value with "***", so a consumer that requires the field still parses the document.
- 7Pick the output stylePreserve keeps your original formatting byte for byte and is the default. Or re-indent at 2 spaces, 4 spaces or a tab, or minify. Whichever you pick, values are copied rather than rewritten, so long numbers and precise decimals come back exactly as they went in.
- 8Review the diff, then downloadThe Diff tab shows the original with removed lines struck through and changed lines marked separately. Download the result, copy it to the clipboard, or press Chain to feed it straight back in for another pass.
What this JSON key remover tool offers
A complete toolkit for removing fields from JSON. Load a file or paste any JSON and the tool immediately scans it, listing every unique key with its occurrence count, value types, first path and a sample value — so you always know what you are about to delete. Remove specific keys from JSON objects by name, list, wildcard pattern or dot path, recursively across the entire tree. Select keys with checkboxes, type patterns, or hit a preset, check the live count, and remove in one click.
- Auto key discovery, at any size — Every unique key in your JSON is catalogued instantly — how many times it appears, what value types it holds, its first example path, and a sample value. Filter, search and select by checkbox rather than guessing names. There is no size at which this quietly stops working.
- Four ways to say which keys — Exact names, wildcards (temp*, *_id, *secret*), full regular expressions, and dot paths that pick out one place in the document. Ticked keys and typed patterns combine, so you can select three keys and add a pattern for the rest.
- Remove, keep, or redact — Remove deletes what matches. Keep inverts it and discards everything else, leaving a matched key's whole subtree intact. Redact leaves the key and replaces the value with "***" so the document still fits the same schema.
- A count before, a diff after — The rail counts matching keys and matching places while you type, before anything changes. Afterwards the card shows unique keys removed, places cleaned, sizes before and after, and the Diff tab marks removed lines and changed lines separately.
Matching keys: names, wildcards, regex and paths
Four modes, and they are not interchangeable. Exact matches a key name literally — a key called id* is matched by typing id*, and typing id does not touch idx. Wildcard treats * as any run of characters and understands the three shapes people actually use: temp* for a prefix, *_id for a suffix, and *secret* for anything containing a term. Regex accepts any regular expression and tests it against each key name, which is the mode to reach for when the rule is "anything ending in At or Date".
Path is the one that changes what is possible. A name matches everywhere it occurs; a path matches one place. On a document with user.email and contact.email, typing email removes both, and there is no way to express "only the one under user" with a name. Typing user.email removes exactly that one. Paths are anchored at the top of the document, so they cannot drift; [] marks an array level, so data[].id reaches into a list; * stands for exactly one level and ** for any number, so **.password finds it wherever it is hiding.
- Exact — The key name, literally. Case-sensitive unless you turn on case-insensitive matching. One per line, or several separated by commas.
- Wildcard — * is the only special character, so a key containing a question mark or a full stop is still matched by typing it. prefix*, *suffix and *contains* all work, and * can appear in the middle.
- Regex — Tested against the key name with the pattern you type. One expression per line — not comma-separated, because a quantifier like a{1,2} contains a comma. An invalid expression is reported rather than silently matching nothing.
- Path — Dot-separated segments from the top of the document. [] for an array level, * for one level, ** for any number. $ at the front is optional.
- Recursive — Applies to name-based rules: with it off, only top-level keys are considered. Paths already say exactly how deep they go, so they ignore it.
- Ticked keys — Checkboxes in the Keys tab are exact-name rules, and they combine with whatever you have typed.
Keep mode: deciding which keys survive
Keep mode inverts the question. Instead of naming what goes, you name what stays, and everything else is discarded. It is the fastest way to cut a wide record down to the few fields you actually want, and it works at every level at once.
Two things have to be true for it to be useful, and both are easy to get wrong. A matched key keeps its whole subtree — keeping user gives you the entire user object, not an empty one. And a key that contains a match has to survive so the match has somewhere to live: keeping email on a list of users returns each user with only its email, rather than an empty document. Anything that neither matches nor contains a match is removed.
- Keeping a branch — Keep user on {"user":{"id":1},"n":2} and you get {"user":{"id":1}} — the object arrives intact.
- Keeping a leaf — Keep email on {"user":{"email":"a","id":1},"n":2} and you get {"user":{"email":"a"}} — user survives because the match is inside it.
- Inside arrays — Array elements are never removed, so keeping one field of a record list gives you the same number of records, each trimmed.
- No matches — If nothing matches, the result is an empty object. That is the honest answer to "keep nothing", and the live count warns you before you run it.
Redacting a value instead of deleting the key
Deleting a key changes the shape of the document. That is usually what you want, and sometimes it is exactly what you cannot have: a consumer validating against a schema, a test fixture whose field list is asserted, a log line a parser expects a fixed set of keys from. Redact keeps the key exactly where it is and replaces its value with the string "***".
The replacement covers the whole value, so redacting a key whose value is an object replaces the entire object — the secret does not survive one level down. Redact is available with every matching mode, and it pairs naturally with a path or a **.token rule when you are preparing a document to hand to somebody else.
- Schema stays valid — The key list is unchanged, so anything checking for required fields still passes.
- Whole values go — Redacting an object or an array replaces all of it, not just its leaves.
- Obvious in review — "***" reads as deliberate in a pull request in a way that a missing field does not.
- Not available in Keep mode — Keep decides which members survive; a survivor with its value replaced is neither kept nor removed, so the control is unavailable there.
Why the values you keep come back unchanged
The ordinary way to edit JSON in a web page is to read it into memory, change it, and write it back out. It is one line of code and it silently damages documents. Reading 12345678901234567890 and writing it back gives 12345678901234567000. 1e400 becomes null. 0.1234567890123456789 loses its last digits. Keys that look like numbers are moved to the front and re-sorted, so {"10":…,"2":…} comes back as {"2":…,"10":…}. Duplicate keys collapse to the last one. \u00e9 is rewritten as an accented character, which matters if something downstream expects plain ASCII.
None of that is a rounding error you can accept, because the person asking to delete one field did not ask for any of it, and nothing on the page tells them it happened. This tool works on the original text instead: it finds the byte ranges belonging to the keys you named and copies everything else. Values are never re-written, so they cannot change. Preserve output returns your own file minus the parts you removed — the same indentation, the same line endings, the same everything. Re-indenting at 2 or 4 spaces, a tab, or minifying, changes only the whitespace between tokens; every number, string and key literal is still copied rather than regenerated.
- Large integers — Identifiers past 9,007,199,254,740,991 — Twitter/X ids, Snowflake ids, some database keys — keep every digit.
- High-precision decimals — Coordinates and currency values with more digits than a double can hold are untouched.
- Key order — Members stay in the order they were written, including keys that look like numbers.
- Duplicate keys — A document with the same key twice keeps both, because a text edit has no reason to merge them.
- Escapes — \u00e9 stays \u00e9, and an escaped forward slash stays escaped.
- Your formatting — Preserve mode is not a re-print that happens to look the same. It is your bytes, minus the removals.
A 25 MB document is catalogued in about 0.1 seconds and edited in about 0.13, off the main thread, so the page stays responsive while it works.
JSON Lines and NDJSON
Logs, database exports and streaming APIs mostly do not produce one big JSON document. They produce one JSON value per line — JSON Lines, also called NDJSON — and that is exactly the shape most likely to contain something you need to strip before sharing it.
A .jsonl or .ndjson file is treated as one value per line automatically. So is a .json or .txt file that does not parse as a single document but whose individual lines each parse. Every line is edited with the same rules, and the result stays one record per line, so it goes straight back into whatever produced it. The key catalogue is built across every line at once, so a field that appears on one record in a thousand still shows up in the list with a count of 1.
- Detected, not configured — The extension decides when it is explicit; otherwise the document is tried whole first, so a pretty-printed .json file is never mistaken for line-delimited.
- Counts span the file — Occurrence counts, value types and sample values are gathered across all lines.
- Line shape is kept — Output is one record per line whichever output style you pick, because a pretty-printed NDJSON file is no longer NDJSON.
- Blank lines — Empty lines between records are ignored rather than treated as an invalid document.
Why remove keys from JSON?
JSON objects accumulate fields that should not travel with them — debug flags, authentication tokens, null placeholders, temporary computation keys. Removing them before you share, log or commit the document shrinks it and, more often, is the difference between a file you can paste into a ticket and one you cannot.
- Before it leaves your machine — Strip passwords, tokens, secrets and internal identifiers out of an API response before pasting it into a bug report. The document never goes anywhere to be cleaned, which is the only version of that promise that means anything.
- Smaller payloads — Dropping null and empty fields from a large export routinely takes a double-digit percentage off the size, and the tool shows you the before and after in kilobytes.
- Cleaner fixtures and configs — Remove generated, debug and timestamp fields before committing an API fixture, so the next diff shows what actually changed instead of a new request id.
- Reshaping a response — Keep mode turns a 40-field record into the four fields you need, at every level at once, which is otherwise a script.
All features at a glance
- Key discovery panel — Auto-scanned from your document at any size. Key name, occurrence count, value types, first path and a sample value. Filter by name; Select All, None and Invert.
- Quick actions — Nine one-click presets: nulls, empty strings, empty arrays, empty objects, all falsy, and keys beginning with _, __, $ or @.
- Manual patterns — One per line, or comma-separated for exact, wildcard and path. Four modes: Exact, Wildcard, Regex and Path.
- Live match count — How many keys match and how many places they occupy, updated as you type and before anything changes.
- Recursive — Match at every depth, including inside arrays, or restrict name rules to the top level.
- Case-insensitive — ID, id and Id all match a single id rule.
- Keep mode — Invert the rule: keep what matches, with its whole subtree, and discard the rest.
- Redact mode — Replace the value with "***" instead of deleting the key.
- Output style — Preserve the original formatting exactly, or re-indent at 2 spaces, 4 spaces or a tab, or minify.
- Diff view — The original with removed lines struck through and changed lines marked separately, plus exact totals for the whole document.
- Chain — Load the result straight back in as the new input for a second pass, without copying anything.
- Download or copy — Save the result as a file or copy it to the clipboard. Pro batches 20 documents into one ZIP.
Limits, and what Pro changes
Everything this tool does is free. Every matching mode, Keep, Redact, all nine presets, JSON Lines, every output style and the full key catalogue work on the free plan, on a document up to 25 MB — which covers the great majority of API responses, exports and fixtures. Pro buys scale and delivery, not features.
- Free — One document at a time, up to 25 MB. Every feature, no watermark on anything, nothing uploaded.
- Pro: size — The cap becomes what your device can actually handle rather than a fixed number, with a warning instead of a refusal when a file is unusually large for it.
- Pro: batch — Queue up to 20 documents, apply one set of rules to all of them, and download the results as a single ZIP.
- Why the cap is there at all — 25 MB is where a mid-range phone stays comfortable, not where the tool struggles. Nothing is uploaded on either plan.
Frequently asked questions
Is my data secure?
Yes. The document is read and edited on your device and is never uploaded — there is no server to send it to, which is why the tool keeps working with the network disconnected. That matters here more than on most tools, because the usual reason to remove a JSON key is that it holds a password, a token or a customer record.
Does removing a key change any of the values I keep?
No, and this is the part most online JSON tools get wrong. They read the document into memory and write it back out, which quietly rounds 12345678901234567890 to 12345678901234567000, turns 1e400 into null, reorders keys that look like numbers, drops all but the last of any duplicate keys and rewrites \u00e9 as an accented character. This tool edits the original text: everything you did not ask to remove is copied byte for byte, so none of that can happen — even when you also re-indent the output.
Does it remove keys from nested objects and arrays?
Yes. With Recursive on, which is the default, every object in the document is visited, including objects nested inside arrays at any depth. Turn Recursive off to limit the removal to the top level only.
What wildcard patterns are supported?
Three forms, and they can be combined. 'prefix*' matches keys that start with the prefix, so 'temp*' matches tempId and tempData. '*suffix' matches keys that end with it, so '*_id' matches userId and postId. '*contains*' matches anywhere in the name. An asterisk is the only special character, so a key that literally contains a question mark is still matched by typing it.
How is Path mode different from typing a key name?
A name matches everywhere it appears; a path matches one place. Typing 'email' removes user.email and contact.email and every other email in the document. Typing the path 'user.email' removes only the one inside user. Paths are anchored at the top of the document, use [] for an array level so 'data[].id' reaches into a list, accept '*' for exactly one level and '**' for any number of levels.
What does Keep mode do to the keys inside the one I kept?
It leaves them alone. Keeping 'user' gives you the whole user object with everything inside it. Keeping a key that is nested deeper also keeps the objects above it, because otherwise there would be nowhere for the match to live — keeping 'email' on a document of users returns each user with only its email.
What is Redact mode for?
Deleting a key changes the shape of the document, and plenty of consumers reject a record with a missing field. Redact keeps the key and replaces its value with "***", so the document still validates against the same schema while the secret is gone. It is the right choice for logs, bug reports and fixtures you are about to share.
What are the Quick Action presets?
Nine one-click rules. Remove nulls drops every key whose value is null; Empty strings drops keys set to ""; Empty arrays and Empty objects drop keys set to [] and {}; All falsy covers those plus false and zero; and _private, __meta, $internal and @meta drop keys beginning with those characters, which is how GraphQL, Angular and many internal APIs mark their own fields. A preset replaces whatever rules are currently set rather than adding to them.
Can I see what will be removed before I remove it?
Yes. As you type a pattern or tick a key, the settings rail counts the matching keys and the number of places they occupy in the document. Nothing has been changed at that point. After you run it, the Diff tab shows the original with removed lines struck through and lines that merely changed — a trailing comma, say — marked separately.
Does it handle JSON Lines and NDJSON?
Yes, and it detects them for you. A .jsonl or .ndjson file is treated as one JSON value per line; a .json or .txt file that does not parse as a single document but whose lines each parse individually is treated the same way. Every line is edited with the same rules and the file stays one record per line.
What if my JSON is invalid?
You get the line, the column and a snippet of the text around the problem, with a caret on the exact character — the same message on every browser, rather than whatever wording your browser happens to use. Links to the JSON Formatter and the JSON Validator sit next to it.
Is there a file size limit?
Free handles one document up to 25 MB, which covers the great majority of API responses, exports and fixtures. Pro removes the size cap in favour of what your device can actually handle and lets you queue 20 documents at once, apply one set of rules to all of them and download the results as a single ZIP. Every matching mode, every preset, Keep, Redact, JSON Lines and every output style are free.
from 54 ratings
Rate this tool
Tap a star — it takes a second