List every key in a JSON document — as unique key names or as full JSONPath key paths — with optional counts and sorting. Handy for auditing unfamiliar API responses.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
What the extractor produces
Point it at any JSON document and it inventories the keys. Two views are available: the de-duplicated set of key names used anywhere in the document — the fastest way to learn an unfamiliar API’s vocabulary — or the full JSONPath of every key, indexes included, which doubles as a map of the document’s shape. Counts and alphabetical sorting are one checkbox each.
Worked example
Input:
{
"id": 101,
"name": "Widget",
"price": { "amount": 9.99, "currency": "USD" },
"variants": [ { "sku": "W-1", "stock": 3 }, { "sku": "W-2", "stock": 0 } ]
}Key names with counts:
id 1
name 1
price 1
amount 1
currency 1
variants 1
sku 2
stock 2The same document in key-paths mode yields addresses like $.price.amount and $.variants[1].sku.
When to use it
- Getting oriented in a large, unfamiliar API response before writing parsing code.
- Building a column list for an export or a database table from real payload data.
- Spotting inconsistent field usage — a key that appears in some array elements but not others shows a lower count than its siblings.
- Producing a checklist of fields for documentation or a data-mapping spreadsheet.
Limitations to know
- Array indexes are positions, not keys, so they never appear in the names list — only inside paths.
- Counts tally each appearance of a name anywhere; they do not distinguish the same field at different depths. Use paths mode when the location matters.
- Key order in “first seen” mode follows document order, which is meaningful in practice but not guaranteed by the JSON specification.
Common errors and fixes
- Empty output — the document is a bare array of scalars or a single value; there are simply no object keys to list.
- Paths contain
['weird key']brackets — that is correct JSONPath for keys with spaces or special characters, not an error. - Need the values too? — this tool lists keys only; use the JSONPath Finder to see every path together with its value preview.
How to use the JSON Key Extractor
- Paste your JSON into the input panel.
- Choose what to extract — unique key names, or the full JSONPath of every key.
- Optionally turn on alphabetical sorting and occurrence counts.
- Click "Extract keys", then copy the list as plain lines or a JSON array.
Frequently asked questions
What is the difference between key names and key paths?
Key names is the de-duplicated set of every property name found anywhere in the document — useful for a quick field inventory. Key paths lists the full JSONPath of each key, including array indexes, so the same name appearing in different places produces multiple paths.
Can I see how often each key occurs?
Yes — enable "Show occurrence counts". A key used at several nesting levels or in every element of an array is counted once per appearance, which quickly reveals inconsistently-used fields.
Are array indexes treated as keys?
No. Indexes are positions, not property names, so they never appear in the key-name list. They do appear inside key paths (for example $.items[2].sku) because a path must be addressable.
Why extract keys from JSON at all?
Auditing an unfamiliar API response, building column lists for exports, checking naming consistency across a payload, and writing mapping code without hand-scanning deeply nested data.