JSON Viewer

Validate, format and pretty print JSON, then explore it as a tree, text or table. A free JSON viewer and formatter that keeps your data in your browser.

About JSON Viewer

This JSON viewer formats, validates and explores JSON in one place. Paste a document, drop a .json file anywhere on the page or load the sample, and it is checked as you type, then laid out as a collapsible tree, as formatted text or as a table, whichever makes the data easiest to read.

It runs entirely in your browser, so API responses, logs and config files never leave your computer. Your last input is remembered in this browser's local storage, unless it is very large, so it is still there after a reload; clearing the input removes it.

How to use

  1. Paste JSON into the input, open or drop a .json file, or choose Load sample JSON.
  2. If the JSON has an error, select Go to error to jump to the exact line and column, or use Repair JSON to review an automatic fix before applying it.
  3. Format the input with 2 spaces, 4 spaces or tabs, or sort the keys alphabetically.
  4. Switch between the Tree, Text and Table views, search keys and values, and select a node to copy its value or its path.
  5. Copy or download the result as formatted or minified JSON, or send it to the Diff Checker to compare it with another version.

Features

Validation with exact positions
Invalid JSON is flagged with the line and column of the problem, and the viewer keeps showing the last valid version while you fix it.
One-click repair
Repair JSON fixes common mistakes such as trailing commas, single quotes, unquoted keys, comments and missing closing brackets, shows the result for review, and can be undone with Ctrl/⌘+Z.
Tree, text and table views
Expand or collapse the whole tree or open it to level 1, 2 or 3, read the formatted text, or show an array as a table and download it as CSV.
Search and filter
Search keys, values or both, step through matches with Enter and Shift+Enter, and hide everything except the matching branches.
Paths in three formats
Copy the path to any node as JSONPath, a JavaScript accessor or a JSON Pointer, ready to paste into code, queries or tests.
Helpful value hints
Links can be opened in a new tab, colour values show a swatch, and a selected timestamp shows a readable date with a shortcut to the Timestamp Converter.
Large numbers kept exactly
Numbers beyond JavaScript's precision are displayed and preserved exactly as written instead of being silently rounded.
Unwrap stringified JSON
When a document is a JSON string that itself contains JSON, Unwrap turns it back into a normal object you can explore.

Frequently asked questions

Is it safe to paste sensitive JSON here?

Parsing, formatting and repair all happen on your device, and your JSON is never uploaded. The only copy kept is in your browser's local storage so the input survives a reload; clear the input when you finish on a shared computer.

What is the difference between formatting and minifying JSON?

Formatting, also called pretty printing, adds line breaks and indentation so people can follow the structure. Minifying removes all optional whitespace to make the JSON as small as possible, which is usually what you want for APIs and storage.

Why does it say my JSON is invalid?

JSON is stricter than JavaScript: keys and strings need double quotes, trailing commas and comments aren't allowed, and values such as undefined or NaN don't exist. The error points to the exact line and column, and Repair JSON can usually fix these problems for you.

How do I view a JSON array as a table?

Select an array, or any item inside it, and switch to the Table view. Each object becomes a row and each key a column, and you can download the table as a CSV file.

Can I compare two JSON documents?

Yes. Choose Compare in Diff Checker to open the formatted JSON on one side of the Diff Checker, then paste the other version on the opposite side to see every change line by line.