JSON viewer & formatter

Input
Drop JSON file here
Ready
Path:Click a node to see its path

Paste JSON to format it, find syntax errors, and explore it as a collapsible tree. Everything runs in your browser, so your data is never uploaded.

How to use the JSON viewer

  1. Add your JSON. Paste it into the Input panel, drop a .json file onto it, or choose Open file. Load sample fills in an example so you can try every feature.
  2. Check the status bar. It reports whether the JSON is valid. If it is not, you get the line and column of the first problem, plus a red marker in the editor.
  3. Format or minify. Format indents the document with two spaces. Minify removes all optional whitespace, which is useful for API requests and config values.
  4. Explore the result. Switch between Raw, Tree, Minified and Validate. In the tree, click any row to see its path (for example $.inventory[0].title) and copy it, or right-click for more options.

What you can do with it

Common JSON errors and how to fix them

Most invalid JSON comes from habits carried over from JavaScript, Python or hand-edited config files. These are the mistakes you will see most often.

MistakeInvalidValid
Trailing comma{"a": 1,}{"a": 1}
Single quotes{'a': 'b'}{"a": "b"}
Unquoted key{a: 1}{"a": 1}
Comment{"a": 1} // note{"a": 1}
Non-JSON value{"a": undefined}{"a": null}
Python literal{"a": True}{"a": true}

The reported position is where the parser noticed the problem, which is often just after the real mistake. A missing comma or an unclosed bracket on the previous line is a frequent cause, so look at the lines above the marker as well as the marked one.

What auto-fix changes, and what it does not

Auto-fix edits only the structure of your text. It never touches the contents of a string, so a URL such as "https://example.com" or a value containing a comma or brace is left alone. It can:

It does not guess missing commas between values or repair unescaped quotes inside strings. The message after each fix lists what was changed. Review the result before you use it, especially after a truncated document was closed, because the missing data is still missing.

JSON syntax rules at a glance

Working with very large numbers

JavaScript stores numbers as 64-bit floating point values, so integers above 9,007,199,254,740,991 lose precision when they are parsed. Database IDs and snowflake IDs often exceed that. This tool formats and minifies the original text, so those digits are kept intact. The tree view has to use JavaScript numbers and may show a rounded value, and the Validate tab tells you when this applies.

Frequently asked questions

Is the JSON viewer free?

Yes. There is no account, trial or usage limit.

Is my JSON uploaded anywhere?

No. Formatting, validation and searching all run in your browser with JavaScript, and nothing you paste is sent to our servers. You can confirm this by opening your browser's network panel while you use the tool. The only thing stored on your device is your light or dark theme choice.

Why does it say my JSON is invalid?

JSON is stricter than JavaScript object syntax. Check the Validate tab for a list of likely causes, then use Go to error to jump to the position the parser reported. If the cause is one of the common mistakes above, Fix can usually repair it for you.

How large a file can I open?

Formatting, minifying and the Raw view handle several megabytes, limited by your device's memory. To keep the page responsive, the tree view pauses above 40,000 nodes and offers to render anyway or switch to Raw view.

Does minifying change my data?

No. It removes whitespace outside of strings and nothing else. Keys, values, order and number formatting stay the same.

What is the difference between a JSON viewer, formatter and validator?

A formatter rewrites the text with consistent indentation, a validator checks that it follows the JSON rules, and a viewer lets you explore the structure. This page does all three, so you can paste once and switch between them.