JSON Formatter

Format, validate, minify, import, and inspect JSON locally.

Your input stays on this device and is processed in your browser.
Input limit: 0 / 2,000,000
JSON output
STEP BY STEP

How to use JSON Formatter

  1. Paste JSON, import a local file, or insert the example.
  2. Format or minify it and use precise error locations when needed.
  3. Inspect the text or expandable tree, then copy or download the result.

Readable, valid JSON

Formatting and validation are the same operation here. The document has to parse before it can be indented, so an error message is what you get instead of a prettified guess, and it carries the position where the parser gave up rather than a general complaint.

That position is where parsing failed, not always where the mistake is. A missing closing brace is reported at the end of the file, because that is the first point the parser can be sure something is wrong. Work backwards from it to the last structure that opened.

Two million characters is the ceiling, which is generous for an API response and small for a data export. JSON with comments or trailing commas is not JSON and is rejected: those are JSON5 and JSONC, and accepting them quietly would mean producing output no strict parser downstream would take.

Frequently asked questions about JSON Formatter

Is pasted JSON transmitted?

No. Parsing, tree rendering, and export happen only in this browser tab.

How large can the input be?

The editor accepts up to two million characters to protect browser responsiveness.

Can I inspect nested values?

Yes. The tree view exposes objects and arrays as expandable branches with a rendering safety cap.