JSON Key Extractor and Path Mapper
Paste a JSON object below to get every key path it contains, including keys buried inside nested objects and arrays. Switch the output between dot notation, value-annotated paths, JSONPath expressions, a nested tree, or a generated TypeScript interface - or simply pretty-print or minify the JSON. JSON you paste is processed entirely in your browser and never leaves this tab. To inspect a live API instead, the Execute cURL tab runs a curl command online and fetches the response for you through a proxy.
Requests are sent through a Cloudflare Worker proxy to bypass browser CORS. The proxy does not log or store requests or responses - see the privacy policy.
JSON Tools
Eight tools, one engine. Each runs entirely in your browser, and the JSON you have pasted comes with you when you switch between them.
A Worked Example
The quickest way to understand what the tool returns is to see one input mapped to each output format. Take this trimmed-down order response, the kind of payload you get back from a typical e-commerce API:
{
"user": {
"name": "Ada Lovelace",
"address": { "city": "London", "country": { "code": "GB" } },
"roles": ["admin", "engineer"]
},
"orders": [
{ "orderId": "ord_1001", "total": 249.99 },
{ "orderId": "ord_1002", "total": 15.50, "giftMessage": "Happy birthday" }
]
}
Key paths (dot notation)
Every key, at its literal position. Note that orders appears twice below it because there are two elements in the array.
user
user.name
user.address
user.address.city
user.address.country
user.address.country.code
user.roles
orders
orders[0].orderId
orders[0].total
orders[1].orderId
orders[1].total
orders[1].giftMessage
The same, with array indices collapsed
Repeated indices merge into [] and duplicates are removed. This is the view you want when documenting a schema rather than inspecting one record.
user
user.name
user.address
user.address.city
user.address.country
user.address.country.code
user.roles
orders
orders[].orderId
orders[].total
orders[].giftMessage
Key paths with value types
Useful when you need to know whether a field is a string, a number, or a container before you write the parsing code.
user object
user.name string
user.address object
user.address.city string
user.address.country object
user.address.country.code string
user.roles array
orders array
orders[].orderId string
orders[].total number
orders[].giftMessage string
TypeScript interface
Objects inside an array are merged, and any key missing from some elements is marked optional - here giftMessage exists on only one of the two orders.
interface Root {
user: {
name: string;
address: {
city: string;
country: {
code: string;
};
};
roles: string[];
};
orders: {
orderId: string;
total: number;
giftMessage?: string;
}[];
}
Path Notation Reference
Different tools address the same nested value in different ways. This table maps a single field - the city inside the first order's shipping address - across the notations you are most likely to meet.
| Notation | How the path looks | Where you use it |
|---|---|---|
| Dot notation | orders[0].shipping.city |
JavaScript and Python source code, and most ORM or config field mappings. |
| Collapsed dot notation | orders[].shipping.city |
Schema documentation and field-mapping spreadsheets, where the index is noise. |
| JSONPath | $.orders[0].shipping.city |
jq, Postman assertions, API gateway transforms, and many low-code integration tools. |
| JSONPath with wildcard | $.orders[*].shipping.city |
Selecting the same field across every element of an array in one query. |
| Bracket notation | orders[0]["shipping"]["city"] |
Required when a key contains a dot, a space, or a hyphen that would break dot notation. |
| JSON Pointer (RFC 6901) | /orders/0/shipping/city |
JSON Patch documents, JSON Schema $ref targets, and OpenAPI references. |
The one case that trips people up is a key that literally contains a dot. If your JSON has {"user.name": "Ada"}, then the dot-notation path user.name is ambiguous - it could equally describe a nested name inside a user object. Switch to the JSONPath output in that situation, which quotes the key as $['user.name'] and removes the ambiguity.
How to Use JSON Keyper
.json file onto it, or click Load sample JSON to try the tool with a realistic order payload. To fetch a live response instead, switch to the Execute cURL tab, paste a curl command, and click Execute. That request goes through a proxy to get around browser CORS, and it is the only part of the tool that sends anything off your machine - how the cURL runner works, and its limits.items[0].sku and items[1].sku into a single items[].sku..txt file (or .ts when you have the TypeScript format selected).Which Output Format Should You Use?
| Format | Best for |
|---|---|
| Key paths | Grabbing an exact accessor to paste straight into code, or checking whether a specific field really exists in a response. |
| Key paths with value types | Deciding how to parse a payload - spotting that an id arrives as a string rather than a number before it causes a bug. |
| Unique key names | Building a field glossary, or diffing the vocabulary of two API versions to see which names were added or dropped. |
| JSONPath | Writing jq filters, Postman test assertions, or extraction rules in an integration platform. |
| Indented tree | Getting a visual sense of shape and nesting depth, especially for an unfamiliar payload. This view always collapses array indices, since drawing one branch per element would bury the shape. |
| TypeScript interface | Bootstrapping typed API clients. Treat the result as a first draft to review, not a finished contract - see the limitations below. |
| Formatted or minified JSON | Reading a one-line API response, or squeezing JSON back onto one line for a log, a queue, or a config value. Only whitespace changes: large integers, trailing zeros like 12.50, and key order come out exactly as pasted. |
Use Cases
API Exploration
Understand the structure of an unfamiliar API response at a glance instead of scrolling through hundreds of lines looking for the field you need. Paste the curl command from the API docs to map a live response directly.
Data Transformation
Map source fields to destination fields in ETL pipelines and migrations. The collapsed-index view pastes cleanly into a mapping spreadsheet.
Schema Documentation
Produce a complete flat list of every field, with types, to paste into API docs or share with the team implementing against it.
Debugging
When a parser cannot find a field, extract the keys to settle whether the field is genuinely absent or simply nested where you did not expect.
Limitations Worth Knowing
No tool fits every job. These are the cases where JSON Keyper will not serve you well, and what to reach for instead:
- Very large files. The full path list is built in memory, so documents in the tens of megabytes may be slow or exhaust the tab. Use a streaming processor such as
jqfor those. - Sample-based type inference. The TypeScript output describes the sample you pasted, not the API's real contract. A field that happens to be
nullin your sample is typednull, and a field absent from your sample cannot appear at all. Review the output against the API documentation. - Numbers are all
number. JSON does not distinguish integers from floats, so the type annotations cannot either. - Keys containing dots. Dot-notation output is ambiguous for these. Switch to JSONPath, which quotes them.
- Not a validator. The tool checks that your JSON parses, but it does not check it against a JSON Schema. For that, see our guide to JSON Schema validation.
- Formatting does not sort keys or repair JSON. The formatted and minified outputs change whitespace only. They keep key order, and they report invalid JSON rather than guessing a fix.
- Live fetches are limited. The Execute cURL tab only reaches public
httpandhttpsaddresses on the standard ports, gives up after 5 seconds, and rejects responses over 2 MB. It cannot reachlocalhostor your internal network, and binary responses come back garbled. Any token or API key in the command passes through the proxy, so paste the response instead if that matters to you. For internal or slow APIs, run curl yourself and paste the output. The cURL runner page lists every supported option and limit. - Not a store or host. JSON Keyper does not save your JSON or give it a URL. Everything is parsed in the browser and gone when you close the tab. If you need JSON hosted at a shareable endpoint, you want a JSON storage service, not this tool.
Frequently Asked Questions
Is my JSON data uploaded to a server?
No, not for JSON you paste. All parsing and key extraction happens in JavaScript inside your own browser tab, and pasted JSON is never transmitted, logged, or stored anywhere. You can confirm this by opening your browser's network tab while extracting keys, or by disconnecting from the internet after the page loads - key extraction keeps working. The one exception is the Execute cURL tab, which has to send your request through a proxy because browsers block cross-origin calls; see the privacy policy for what that involves.
Why do array indices appear in the output as items[0].name?
By default JSON Keyper reports the literal path to every key it finds, so an array of three objects produces three separate paths. Tick Collapse array indices to merge them into a single items[].name entry, which is usually what you want when you are documenting a schema rather than inspecting one specific record.
What is the difference between dot notation and JSONPath?
Dot notation such as user.address.city is how you access a value in JavaScript or Python code. JSONPath such as $.user.address.city is a query language understood by tools like jq, Postman, and many API gateways, and it supports wildcards like $.orders[*].total. JSON Keyper can output either.
Can JSON Keyper pretty-print or minify JSON?
Yes. Choose Formatted JSON (2-space or 4-space indent) or Minified JSON in the format list. Unlike formatters that parse and re-serialise, it changes only whitespace, so large integers such as 1839274619283746817, decimals such as 12.50, key order, and duplicate keys come out exactly as you pasted them. The JSON formatter page shows what the usual approach does to those values.
Can JSON Keyper handle large JSON files?
Files up to a few megabytes are handled comfortably. Because the tool builds the full path list in memory, very large documents (tens of megabytes) may be slow or may exhaust the browser tab's memory. For files that size, a streaming command line tool such as jq is a better fit.
Does the TypeScript interface generator handle optional fields?
Yes. When an array contains several objects, JSON Keyper merges their shapes and marks any key that is absent from some elements with a question mark. In the built-in sample, giftMessage appears on only one of the two orders, so it is generated as giftMessage?: string. A key that is present but null on some elements stays required and gains | null instead - the sample's trackingCode is generated as trackingCode: string | null. The JSON to TypeScript page explains why that distinction matters.
What happens to keys that contain dots or special characters?
Dot notation becomes ambiguous when a key name itself contains a dot, because user.name could mean a nested field or a single literal key. The JSONPath output avoids this by quoting such keys in brackets, and the TypeScript output quotes them as string literal keys.
Can I use JSON Keyper to store or host my JSON?
No. JSON Keyper does not save your JSON or give it a URL - it is parsed in your browser and discarded when you close the tab. That is a design choice rather than a missing feature: there is no copy on a server to leak, expire, or be fetched by anyone else later. The Execute cURL tab does send your request through a proxy to reach the API you named, but nothing is retained there either. If you need JSON hosted at a shareable endpoint, for a mock API or a demo, you want a JSON storage service, which is a different category of tool.
Can I fetch JSON from an API directly, instead of pasting it?
Yes. Switch to the Execute cURL tab, paste a curl command, and JSON Keyper sends it through a Cloudflare Worker proxy to bypass the browser's CORS restrictions. The proxy fetches the response and hands it back to the page, where you can extract keys from it just like pasted JSON. It only reaches public http and https URLs, times out after 5 seconds, and caps responses at 2 MB; it does not log or store requests or responses. Run a curl command covers which curl options work and exactly what the API receives.
Further Reading
Focused guides for a single output format, each with a worked example:
- JSON to TypeScript Interface Converter - how nested objects are inlined and optional fields detected.
- Flatten JSON to Dot Notation - collapsed vs expanded array indices, and when each view is the right one.
- JSONPath Expression Generator - wildcards, bracket notation, and how JSONPath differs from plain dot notation.
- JSON Tree Viewer - the structure as an indented outline, and why the tree always collapses array indices.
- Run a cURL Command Online - which curl options work, what the API receives through the proxy, and every limit.
- JSON Formatter - pretty-print or minify without changing a single value, and why most formatters cannot promise that.
- JSON Diff - compare two documents by value or structure, with breaking changes flagged and array items matched by ID.
Longer guides on working with JSON, written alongside this tool:
- How to Extract All Keys from a JSON Object - the same job done in JavaScript, Python, Ruby, and jq, with a comparison of when each is worth the effort.
- Understanding Nested JSON Objects and Arrays - safe access patterns for deeply nested data, and how to flatten a structure.
- Common JSON Structures in REST APIs - the envelope, pagination, and error shapes you will meet again and again.
- JSON Schema: A Practical Guide to Validating JSON - moving from "what keys are here" to "what keys are required".
- Working with JSON in Python - parsing, custom encoders, and streaming large files.
- Jackson vs Gson vs Moshi - choosing a JSON library on the JVM, and the unknown-property default that breaks services in production.
- Processing Large JSON Files - measured memory for jq and Python, and why plain jq is not a streaming tool.
- Why Your Browser Blocks API Calls - CORS, preflight requests, and what routing a request through a proxy actually costs.
- Browse all articles
Who Maintains JSON Keyper
Recent changes (full history in the changelog):
- September 30, 2026 - a cURL runner page, and curl commands now support
-u,-G,--json,-b, and more, exactly as curl sends them. - September 30, 2026 - JSON Diff: compare two documents by value or structure, with breaking changes flagged.
- September 29, 2026 - a new guide testing how Jackson, Pydantic, and Zod handle null, missing, and unknown fields, and a JSON formatter that never changes a value.
JSON Keyper has no accounts and no paywall. If it saves you time, you can support the project on GitHub Sponsors.
Found a document the tool handles wrongly? Tell me, or open an issue on GitHub.