Online JSON Formatter, Validator & Tree Viewer
Validate, format, minify and explore JSON as a tree, entirely in your browser. Includes fixes for the most common JSON syntax errors.
Guide: Working with JSON Online
JSON (JavaScript Object Notation) is the most common format for exchanging data between web services, configuration files and apps. It is easy for machines to parse, but a single missing comma or unescaped quote makes a whole document invalid, and minified API responses are hard for people to read.
This editor lets you paste or type JSON, validate it, pretty-print it with consistent indentation, minify it to save space, and explore it as a collapsible tree. The editor highlights syntax and points to the line where parsing failed. Everything happens locally in your browser, so you can safely inspect internal API responses or config files: the data is never uploaded.
How to use it
- Paste JSON into the input editor on the left, or start typing.
- Click Validate to check the syntax. Errors show the position of the problem.
- Click Format to pretty-print, or Minify to remove all unnecessary whitespace.
- Switch the output to Tree view to expand and collapse nested objects and arrays.
- Use Copy or Download to take the result back to your project.
Common errors and how to fix them
- Trailing comma: {"a": 1, "b": 2,} is invalid in JSON. Remove the last comma.
- Single quotes: {'name': 'Ann'} must be written as {"name": "Ann"}. JSON only accepts double quotes.
- Comments: // and /* */ are not allowed in standard JSON. Remove them, or use a format such as JSON5 for config files.
- Unquoted keys: {name: "Ann"} needs quotes around the key: {"name": "Ann"}.
More questions
Is my JSON sent to a server?
No. Parsing, formatting and the tree view all run in your browser using JavaScript.
How large a file can I open?
Files of several megabytes work well. Very large files depend on your device memory and may make the tree view slow.
What is the difference between Format and Minify?
Format adds line breaks and indentation for reading. Minify removes them to make the smallest possible payload for transfer or storage. The data itself is identical.