JSON Viewer and Formatter

Paste JSON above, or drop a file on the page. The tool formats it, shows it as a tree, finds the part you need, repairs it when it is broken, and compares it with another file. It runs inside your browser, so your data never reaches a server.

What it does

Format and minify

Make a file readable with the indent you choose, or make it as small as possible. A sort of the keys is one switch away.

Validate

The status bar says whether the document is valid JSON, and gives the line and the column of the first fault.

Open a large file

A file of 120 MB opens in about one second and scrolls at full speed, because only the rows you can see exist in the page.

Read comments

// and /* */ work, and the format keeps them. So do trailing commas, single quotation marks and bare keys.

Fix broken JSON

One button closes open brackets, adds missing commas, corrects True and None, and says what it changed.

Search and JSONPath

Plain find, a regular expression, or a JSONPath such as $..email over the whole document.

Compare two files

Every difference, by path. White space, the order of keys and 1.0 against 1 do not count.

Convert

Write the document as CSV, as YAML, or as a TypeScript interface.

Check a schema

Test the document against a JSON Schema. Every problem is marked in the tree, with a plain message.

How to use it

  1. Paste your JSON in the Text tab, or press Load file, or drop a file anywhere on the page.
  2. Press Format to make it readable, or open the Viewer tab to see the tree.
  3. Press Collapse all, then open one level at a time. The shape of a strange file appears in seconds.
  4. Press / to search. Change the mode to JSONPath for an expression such as $.users[?(@.active == true)].
  5. Use Tools for the comparison, the table view, the schema check and the conversions.

Common questions

Is this JSON viewer free?

Yes. There is no account, no sign-up and no limit on how many files you open.

Is my JSON data uploaded to a server?

No. The whole tool is a set of static files, and your document is read inside your own browser. Open the Network tab of your browser and watch: nothing carries your data. The privacy page says exactly what the site does collect.

How large a JSON file can this viewer open?

A file of 120 MB opens in about 1.3 seconds and stays smooth. Most online viewers stop answering at about 20 MB, because they build one element in the page for every value. This one does not. See large JSON files.

Does this JSON viewer accept comments?

Yes. // and /* */ both work, and Format keeps them. A Strict JSON switch refuses them, like the standard. Read comments in JSON.

Can it repair broken or invalid JSON?

Press Fix. It closes open brackets, adds a missing comma or colon, changes True, None and NaN, puts quotation marks around a bare value, and removes a JSONP wrapper or a byte-order mark. It lists every change it made.

Can it compare two JSON files and show the differences?

Yes. Tools → Compare with another file. See how to compare two JSON files.

Does this JSON viewer work offline?

Yes. Open the page one time, then turn off your connection. Every action still works. That is also the simplest proof that nothing is uploaded.

Does it keep a large number exact?

Yes. It never calls JSON.parse, so an identifier of 19 digits comes back with every digit as you wrote it. Most tools change the last digits without a warning. See big numbers in JSON.

Can it read a JSON Lines or NDJSON file?

Yes. A file with one value on each line is shown as a list, and Format turns it into a proper JSON array. See JSON Lines.

Which browsers does it work in?

Any current version of Chrome, Edge, Firefox or Safari, on a computer or a phone.

Guides