JSON Viewer & Validator
Browse JSON as a collapsible tree and find syntax errors down to the line.
How to use the JSON Viewer & Validator
- 1Drop a .json or .jsonl file, or paste JSON.
- 2Errors are marked at the exact line and column with a plain explanation.
- 3Explore the tree, copy any path, then format or minify and download.
About JSON Viewer & Validator
The JSON Viewer & Validator opens .json, .jsonl and .ndjson files or pasted text and checks them against strict JSON syntax as you type. Each problem is listed with its line and column and a plain-language message, such as a trailing comma, a single-quoted string or an unquoted property name, and clicking it jumps to the spot in the editor. Duplicate keys are reported as warnings, because most parsers silently keep only the last value.
Besides the code view, the JSON viewer shows the data as a collapsible tree with search, where you can copy the path of any node (for example $.orders[0].id) or its value. When the document contains an array of objects, a table view lets you sort and search the records. A status bar counts values, nesting depth and lines. Format re-indents the file with two spaces, four spaces or tabs; Minify strips whitespace while keeping every number and string exactly as written.
This JSON formatter and lint tool is handy for developers inspecting API responses, debugging config files such as package.json or tsconfig.json, reviewing log exports in JSON Lines format, or cleaning up data before committing it. Files up to 200 MB can be opened, and very large trees show their first 150,000 values.
Frequently asked questions
Is my JSON uploaded anywhere?
No. The file is read and checked in your browser; nothing is sent to a server.
What does the validator check?
Strict JSON syntax, including trailing commas, comments and single quotes that JSON does not allow, and duplicate keys that most parsers silently overwrite (for files up to 8 MB).
Does it handle JSON Lines?
Yes. Files with one JSON value per line are checked line by line and can be shown as a table.
Why are trailing commas not allowed in JSON?
The JSON standard (RFC 8259) only allows commas between items, not after the last one. JavaScript object literals accept trailing commas, which is why they often slip into JSON files, but strict parsers reject them.
How do I get the path to a value in a JSON file?
Select the value in the tree view and copy its path. Paths use dot and bracket notation starting at $, like $.items[2].name, which matches the JSONPath style used by many tools.
Guides
- How to Open a JSON File and Find Syntax ErrorsA JSON file won't load and the error only says "unexpected token". Learn how to open JSON readably and track down the exact line that breaks it.
- What Is a JWT and How Do You Decode It?JSON Web Tokens explained: the three parts, the common claims, what "signed" does and doesn't mean, and how to decode and verify a token safely.
More in File Viewers
Drop any file to look inside it, with the right viewer picked for you.
Check YAML for indentation and syntax errors and explore it as a tree.
Check that XML is well-formed and browse elements and attributes as a tree.