Format, minify, and validate JSON — with an interactive tree view, syntax highlighting, and JSONPath queries.
JSON formatting adds indentation and line breaks to JSON data so it's easier for people to read and inspect. This tool validates, formats, and minifies JSON entirely in your browser, with an interactive collapsible tree view, syntax highlighting, and a JSONPath query evaluator for pulling specific values out of nested structures.
JSON (JavaScript Object Notation) is a lightweight, text-based data format used almost universally for APIs, configuration files, and data exchange between systems. It's built from a small set of structures — objects ({}), arrays ([]), strings, numbers, booleans, and null.
$.users[0].email or $..id for every "id" field at any depth.| Syntax | Meaning |
|---|---|
$ | The root value |
.key | Access an object property |
['key'] | Access a property (bracket notation) |
[0] | Access an array index |
[*] | All elements of an array or all values of an object |
..key | Recursive descent — find "key" at any depth |
This covers the common cases; it doesn't implement the full JSONPath specification (e.g. filter expressions like [?(@.price<10)] aren't supported).
Common causes: trailing commas, single quotes instead of double quotes, unquoted keys, or a missing closing bracket. The error message includes the position where parsing failed.
Formatting adds indentation for readability; minifying removes all unnecessary whitespace to reduce file size — useful before sending JSON over a network.
Keys counts every object property across the whole structure; depth is the deepest level of nesting; size compares the input and formatted output byte size.