Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Extract JSON Keys

Paste JSON and instantly extract all unique keys with nested key support, dot notation, and sorting

Your files never leave your browser
JSON Input0 chars, 0 lines
Drag & drop a JSON file here, or browse
Accepts .json files
Extracted Keys0 keys
Ready·

Paste any JSON — flat or deeply nested — and pull out every unique key path in one click, with dot notation, depth levels, and alphabetical sorting. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste JSON
➔
Recursive Key Walk
➔
Sorted Key List

The parser reads your JSON and walks every object recursively. Each key gets recorded with its full dot-notation path (like user.address.city) and its depth level. Arrays are traversed too — if an array contains objects, those keys show up in the output. Duplicate paths are filtered out, so you get a unique set of every key that exists anywhere in the structure.

Examples

Flat API Response

A simple user object from a REST endpoint — no nesting.

INPUT
{"id": 42, "name": "Priya Sharma", "email": "[email protected]", "active": true}
OUTPUT
id name email active

Nested E-Commerce Order

An order object with shipping address and line items — the kind of thing where you need dot notation to keep track of what's what.

INPUT
{"orderId": "ORD-7891", "customer": {"name": "Leo Chen", "address": {"street": "45 Oak Lane", "city": "Portland", "zip": "97201"}}, "items": [{"sku": "BK-301", "title": "Rust in Action", "price": 39.99}]}
OUTPUT
orderId customer.name customer.address.street customer.address.city customer.address.zip items.sku items.title items.price

Config File With Mixed Types

App config files often mix strings, numbers, booleans, and nested objects. Quick way to audit what settings exist.

INPUT
{"app": "tracker", "version": "2.4.1", "database": {"host": "db.internal", "port": 5432, "ssl": true}, "features": {"darkMode": false, "beta": {"enabled": true, "users": ["admin"]}}}
OUTPUT
app version database.host database.port database.ssl features.darkMode features.beta.enabled features.beta.users

Who Uses This

👨‍💻 Backend Developers

Map API response fields to database columns or build TypeScript interfaces from raw JSON payloads.

📊 Data Analysts

Inventory all the fields in a dataset export before writing transformation queries.

🛠️ QA Engineers

Compare keys across two API versions to catch missing or renamed fields before release.

🎓 Students

Understand the shape of JSON data structures in coursework without reading every nested bracket by hand.

Common Mistakes

Pasting JSON with a trailing comma

Trailing commas after the last property ({"a": 1,}) are valid in JavaScript but not in strict JSON. The parser will reject it. Remove the comma before the closing brace or bracket.

Forgetting to enable nested keys

With nested keys off, you only see top-level keys. If your JSON has objects inside objects, turn on the nested toggle or you will miss everything below the first level.

Expecting array index numbers in the output

This tool extracts key names, not array positions. An array like [{"x":1},{"x":2}] gives you x once — not [0].x and [1].x. It is showing unique key paths, not every value location.

Technical Details

Frequently Asked Questions

What does "extract JSON keys" actually mean?

It means pulling out every property name from a JSON object (and its nested objects) into a flat list. Instead of reading through the whole structure, you get just the field names — like getting a table of contents for your data.

Does this work with nested JSON objects?

Yes. Turn on the "Nested Keys" toggle and you'll get dot-notation paths like user.address.city. Without it, only top-level keys appear. Most people want nested on — it's the whole point when your data goes more than one level deep.

Can I extract keys from a JSON array?

Absolutely. If your top-level JSON is an array of objects, the tool walks into each object and collects all the keys. You get one combined list of unique keys across every item in the array.

Is my JSON data sent to a server?

No. Everything happens in your browser using JavaScript. Your data stays on your machine the entire time. There is no backend, no API call, no logging. Close the tab and it's gone.

How do I extract keys from JSON in Python or JavaScript?

In Python, json.loads(data).keys() gives you top-level keys. For nested keys you'd write a recursive function. In JavaScript, Object.keys(obj) does the same for one level. This tool does the recursive part for you — paste the JSON and you're done, no code needed.

Share: