Extract JSON Keys
Walk every key in a JSON document - dot, bracket, JSONPath, or RFC 6901 notation; collapse arrays to []. Free, offline, client-side, instant, secure.
Walk every key in a JSON document and emit one path per key. Pick the notation -
a.b.c dot paths, $["a"]["b"] JSONPath, RFC 6901 JSON Pointer
(/a/b), or bracket - and collapse repeated array indices to
[] to get a schema view.
How to Use Extract JSON Keys
- Paste your JSON. Any well-formed JSON works - object, array of objects, deeply nested. The parser shows a clear error if the syntax is wrong.
- Pick a path notation. Dot is the most common (
user.tags). Bracket avoids ambiguity for keys with special characters (["user.name"]). JSONPath ($.user.tags) is the convention used by JSONPath query engines. JSON Pointer (/user/tags) is RFC 6901, used by JSON Patch and JSON Schema. - Pick an array mode. "Collapse to []" treats
[0],[1],[2]as one logical path (the schema view) - turn this on to dedupe paths across array items. "Indexed" emits every individual index for full coverage. - Toggle the extras. "Top-level only" gives just the keys at the root (and at the root level of each item if the root is an array). "Include intermediate" emits every parent path so you see
a,a.b,a.b.crather than just the leafa.b.c. "Unique only" dedupes - pair this with "Collapse to []" for a clean schema. - Pick the output format. List (one per line, custom separator via Reset isn't exposed but the default newline covers 99% of cases), CSV (RFC 4180 quoting), or JSON array.
- Read the stats line. Selected style, array mode, total path count, unique count. Output updates live (200 ms debounce).
- Copy or download. Ctrl/Cmd + Enter copies. Download saves
keys.txt,keys.csv, orkeys.json.
Frequently Asked Questions
What is a “path”?
A path identifies one position inside a JSON document. user.tags in {user: {tags: [...]} means “the tags field of the user object”. The exact notation depends on the convention – JSON Schema uses dot/bracket, JSONPath uses $. prefix and bracket-star for wildcard arrays, JSON Pointer (RFC 6901) uses slashes. Pick whichever matches your target consumer.
What’s the difference between Collapse and Indexed array modes?
For {users: [{name: 'Alice'}, {name: 'Bob'}]}:
Collapse walks both objects but uses [] for every array level – output is users[].name, users[].name. Pair with “Unique only” and you get the clean schema view: users[].name.
Indexed uses the real indices – output is users[0].name, users[1].name. Useful when you need to address every specific element (e.g. building a JSON Patch).
What’s the difference between leaf-only and “include intermediate”?
By default the tool emits only paths to leaf values (the value at a.b.c is a scalar, not an object). With “Include intermediate” on, every parent path is also emitted – a, a.b, then a.b.c. Use it when you want to enumerate every reachable node (for JSON Patch operations, for example), not just the leaves.
What does “Top-level only” do?
It bypasses the recursive walker and returns only the keys at the root. For an object root, that’s Object.keys(root). For an array root, the tool collects the union of top-level keys across every object element – so [{a:1}, {b:2}, {a:3, c:4}] yields a, b, c. Other modes (path style, array mode, intermediate) are ignored in this mode.
What about keys with dots or special characters?
In dot notation, keys that aren’t valid JS identifiers get bracket-quoted automatically: {"first.name": 1} emits ["first.name"]. Bracket notation always quotes. JSON Pointer escapes ~ and / per RFC 6901 (~ → ~0, / → ~1). So you can round-trip these paths back to the same key.
Does it validate JSON?
Yes. The tool uses native JSON.parse and surfaces the parser’s error message verbatim – e.g. JSON parse error: Unexpected token } in JSON at position 42. If you want JSONC (with comments) or JSON5, strip the non-standard bits first using a different tool.
What does the stats line tell me?
Path style + array mode + total count + unique count. The “total” is how many paths the walker emitted before any dedup; “unique” is how many distinct paths exist. The difference shows you how much redundancy there is (large for arrays in Indexed mode, low for Collapse + Unique).
Is my data uploaded?
No. The page loads three static files (HTML, CSS, JS) and then runs entirely in your browser. Your JSON bytes never leave the device – no fetch, no XHR, no analytics, no cookies. You can disconnect from the internet after the page loads and the tool still works.
Is this tool free?
Yes – free, unlimited, no signup, no watermark. The extracted paths are yours to use anywhere. Attribution to is appreciated but not required.