JSON Formatter and Tree Viewer

Paste JSON, pretty-print it, inspect it in a collapsible tree, then copy or export the formatted text.

Formatted JSON
Viewer mode
A JSON tree and formatted text view will appear here.

What it does

JSON is easy for machines to pass around and surprisingly hard for humans to inspect once it arrives minified, nested, or spread across logs. A formatter turns that raw payload into stable indentation, readable keys, and a tree you can collapse while debugging.

This tool uses the vanilla-jsoneditor package for the JSON tree viewer because it works in plain JavaScript and includes tree, text, formatting, and syntax highlighting features without requiring a frontend framework.

Common uses

  • Paste API responses, webhook payloads, config files, JWT payloads, or log snippets to inspect their structure.
  • Paste line-delimited JSON values and the tool will format them as one array for easier viewing.
  • Use the text view to copy the complete pretty-printed JSON or export it as a .json file.

Watch outs

  • Strict JSON requires double-quoted property names and no trailing commas.
  • Line-delimited JSON is converted into a JSON array so it can be viewed as one structured document.
  • Very large payloads may take a moment to parse and render in the browser.

Privacy

JSON is parsed, formatted, copied, and exported in your browser. The pasted payload is not uploaded.

FAQ

Can this format multiple JSON objects pasted from logs?

Yes, when each line is a valid JSON value. The formatter turns those lines into a single JSON array for tree viewing and export.

Can I copy the entire formatted JSON as plain text?

Yes. The Copy button copies the full pretty-printed JSON string, not just the visible tree selection.

Which package powers the JSON tree?

The tree viewer uses vanilla-jsoneditor, a plain JavaScript build of svelte-jsoneditor with tree, text, table, formatting, and highlighting support.

Related tools