JSON Path Extractor
JSONPath · Full path listing · Node extraction
JSON Path
Ready
ABOUT
About JSON Path Extractor
Browse all paths in complex JSON, or use JSONPath expressions (e.g. $..price) to extract target fields precisely.
Beyond GraphQL, JSONPath remains one of the most efficient ways to explore REST API response structure. Enumerate all paths to build an index, then extract precisely with expressions—cutting time to learn a new API from hours to minutes.
DEEP DIVE
Learn More About JSON Path Extractor
JSONPath is JSON's equivalent of XPath—expressions locate nodes in nested data. For example, $..price recursively finds all price fields; $.store.book[*] gets all array elements. JSONSort Path tool supports full JSONPath syntax and also lists all paths when left empty.
When taking over an unfamiliar API or analyzing large third-party JSON, listing all paths first is the fastest exploration method—far quicker than scanning hundreds of lines by eye.
JSONPath specs vary across implementations (filter expressions, recursive descent, etc.). JSONSort uses a common syntax subset covering $..field, array slices, conditional filters, and 90% of daily scenarios. Validate complex expressions on small samples before applying to full datasets.
FEATURES
Core capabilities
Full Path Enumeration
Leave JSONPath input empty to automatically list all leaf node paths in JSON.
JSONPath Query
Supports standard JSONPath expressions: $, .., [], *, ?(), and more.
Filter Expressions
Use conditions like ?(@.field > 10) to filter array elements.
Formatted Results
Extracted results output as JSON, ready to copy and use.
Syntax Validation
Shows error lines when JSON input is invalid—avoid querying dirty data.
Local Execution
Query logic runs in the browser; data never uploads.
Path Copy
Enumeration results can be copied as path strings for code or documentation.
Multi-Result Output
When multiple nodes match, returns a JSON array for downstream processing.
HOW TO USE
How to use
-
1
Paste JSON data
-
2
Leave empty to list all paths, or enter JSONPath
-
3
View extraction results and copy
-
4
Adjust indent, JSON5, sort, and other advanced options in the toolbar
-
5
Copy results or continue with Diff, path query, and other tools
WORKFLOW
Typical workflow
End-to-end workflow from import to export, helping teams standardize JSON Path Extractor usage.
Import JSON
Paste API responses or upload config files; ensure valid syntax.
Browse All Paths
Leave JSONPath empty to browse all leaf paths and build structural understanding.
Write Expression
Enter $..target or filtered expressions and view extraction results.
Apply to Code
Copy paths to lodash get, JMESPath, or field descriptions in docs.
USE CASES
Use cases
Frontend developers
Explore unknown API response structure and determine paths like data.user.list.
Backend developers
Verify serialized JSON contains expected field paths.
Data Analyst
Extract specific metric fields from complex nested JSON.
QA engineers
Confirm whether an API response contains or lacks a JSONPath.
QA Automation
Verify key JSONPath paths still exist and types unchanged in regression APIs.
Scraper / Data Collection
Analyze third-party API responses to determine extraction paths for scraper rules.
TIPS
Tips
- First step with a new API: leave path box empty and browse all paths to build a mental model.
- $..fieldName recursively finds fieldName at all levels—very useful.
- Array filters use ?(@.price < 10) to quickly select matching elements.
- Paste extraction results into Code Generator to reverse-generate TypeScript types.
- When paths are too many, use formatter + tree view—more intuitive than a plain path list.
- JSONPath expressions are case-sensitive; field names must match JSON exactly.
- $.store.book[*].author is a classic example for quickly validating expression syntax.
- Don't quote numbers in filter comparisons: ?(@.price < 10).
- Exported path lists work as a field index appendix in API documentation.
- For very deep paths, consider backend flatten or GraphQL to reduce frontend extraction complexity.
LOCAL VS ONLINE
Local vs online tools
JSONSort stays purely frontend—this comparison shows why local tools fit dev data better.
TROUBLESHOOTING
Common pitfalls & fixes
Issues you may hit in practice and how to handle them—save time on trial and error.
Too Many Paths to Scan
Tip:Use formatter tree view for top-level structure first, then query specific subtrees.
Filter Expression Error
Tip:Simplify the expression and add conditions step by step; confirm @ references the current node.
Array vs Object Confusion
Tip:Note the difference between [0] and .field; use full path list to confirm node types.
Special Character Keys
Tip:Keys with spaces or symbols use ["key name"] bracket notation.
FAQ
FAQ
Which JSONPath syntax is supported?
Supports common JSONPath expressions: $, .., [], *, ?(), @, and more.
What's the difference between path list and query results?
Empty input outputs all paths; with an expression, outputs matched node values.
Can it handle JSON with array root?
Yes. When root is an array, paths appear as $[0], $[1], etc.
Why does my expression return empty?
Check field name case, array index bounds, and whether .. recursion matches expected levels.
Can it update values in JSON?
Read-only extraction currently. Edit JSON and re-query to modify values.
Is data uploaded to a server?
No. All JSONSort tools run locally in your browser—your input is never sent to any backend.
Do I need to sign up or install anything?
No. Open the page and go—no account, no client download, PWA offline cache supported.
How large can files be?
Depends on browser memory; multi-MB data usually runs smoothly. Split very large files or use merge & clean first.