Too Much Tools logoToo Much Tools

JSON Viewer & Beautifier

Format, minify, sort and validate JSON locally, with precise error locations.

Local, Runs entirely in your browser, your data never leaves your device.
Loading tool…

Format, minify, and inspect JSON with exact error locations

This is a JSON formatter, minifier and validator in one: paste JSON and it beautifies automatically as you type, reports the exact line and column of a syntax error, and can minify or sort keys alphabetically on demand. A tree view lets you collapse and explore nested structures instead of scrolling raw text. Formatting runs entirely in your browser, so pasted API responses or config never reach a server.

How to use the JSON Viewer & Beautifier

  1. Paste or type JSON into the input panel; valid input formats automatically.
  2. Click Beautify to pretty-print with the chosen indent, or Minify to collapse it.
  3. Choose 2 or 4 spaces from the Indent dropdown to match your style.
  4. Toggle Sort keys to reorder every object's keys alphabetically at every depth.
  5. Switch to the Tree view to expand and collapse nested objects and arrays.

A syntax error is reported with its line and column when the underlying parser exposes a position, so you can jump straight to the broken character instead of scanning the whole document. The stats bar above the editor also counts objects, arrays, keys and maximum nesting depth for valid input.

Frequently asked questions

Does this JSON formatter validate before it formats?
Yes. Parsing happens on every keystroke, and invalid JSON shows the exact line and column of the syntax error underneath the input instead of silently failing to format.
Can I sort JSON keys alphabetically?
Yes, the Sort keys checkbox reorders every object's keys alphabetically at every level of nesting before formatting; arrays keep their original element order since sorting them would change their meaning.
What's the difference between the formatted view and the tree view?
The formatted view is the indented JSON text you'd copy into a file; the tree view renders the same data as a collapsible structure so you can expand only the branches you need to inspect.
Is large or sensitive JSON safe to paste into this formatter?
Yes. Parsing and formatting happen locally in your browser tab; nothing you paste, including tokens or internal API responses, is sent to a server at any point.