Free online JSON formatter, minifier, validator with collapsible tree view, JSONPath query and statistics. Extract node paths and beautify JSON data instantly, all processed locally.
Beautify JSON data in one click with 2-space, 4-space or Tab indentation for clear structure
Collapsible tree structure for inspecting deeply nested JSON, click nodes to extract paths
Supports $.key, $..recursive, $.arr[0], $..arr[*] syntax to locate and filter JSON nodes
Real-time display of node count, max depth, key count, array items, chars and file size
JSON syntax errors show exact line and column numbers for quick debugging
All operations run in your browser, data never leaves your device, protecting your privacy
Paste or type JSON data in the left input box, or click "Sample" to load example JSON. Input is parsed and validated automatically.
Select indentation (2/4 spaces/Tab), switch between "Text View" for highlighted code or "Tree View" for collapsible structure.
Click "Format" to beautify JSON structure, or "Minify" to remove spaces and line breaks. Result shows on the right in real time.
Enter a JSONPath expression (e.g. $.user.name) to highlight matching nodes. In tree view, click any node to copy its full path.
Inspect API JSON responses, quickly locate fields and troubleshoot interface issues
Format JSON config files, inspect hierarchy in tree view, ensure correct structure
Use JSONPath to batch extract target fields from JSON for data cleaning
Validate JSON format exchanged between frontend and backend, pinpoint syntax errors
Tree view intuitively shows JSON structure, stats help understand hierarchy concepts
Format JSON logs, expand/collapse to inspect key fields, boost analysis efficiency
JSON (JavaScript Object Notation) is a lightweight data interchange format based on a subset of JavaScript. It uses a language-independent text format to store and represent data. Its concise and clear hierarchy makes it an ideal data exchange language, widely used in web development, APIs, and configuration files.
JSON supports six data types: Object, Array, String, Number, Boolean, and null. JSON does not support functions, dates, or regular expressions like JavaScript; these must be serialized as strings.
JSON is more concise than XML, parses faster, and takes less space. JSON is natively supported by JavaScript while XML needs DOM parsing. JSON supports arrays natively; XML requires nested tags. Most modern APIs use JSON as the data exchange format.
JSONPath is an expression language for querying JSON data, similar to XPath for XML. Using syntax like $.key, $..key, $.arr[0], you can quickly locate nodes in JSON. It is an essential tool for handling complex JSON data.
JSONPath is an expression language for querying JSON data. This tool supports a common syntax subset. Examples:
$
Represents the entire JSON document root
$.user
$.user.name
Dot notation for object fields, supports chaining
$.items[0]
$.items[-1]
Access array elements by index, supports negative (from end)
$..name
Recursively find all fields named "name" at any level
$.items[*]
$.user.*
Match all array elements or all object fields
$['user-name']
$.items[0]['name']
Use bracket strings for keys with special characters