🧩

JSON Viewer & Formatter

Format, validate, minify, or explore JSON with a collapsible tree view — entirely in your browser.

Indent

Input JSON

0 chars

Pretty printed

Paste JSON to see output here

About this tool

A free, browser-based JSON viewer with pretty printing, minification, and a collapsible tree view. Catch syntax errors with line and column hints, see object depth and key counts at a glance, and copy clean output back to your clipboard with one click.

🌳Collapsible tree view with syntax highlighting
Pretty print with 2 or 4 space indent
📦Minify to remove all whitespace
🚨Inline error messages with line and column
📊Stats: byte size, key count, max depth
🛡️All processing is client-side and private

How to use it

Quick steps to get the most out of this utility.

  1. 1

    Paste your JSON

    Copy any JSON string — an API response, config file, or log line — and paste it into the input box.

  2. 2

    Pick a view mode

    Pretty for human-readable formatted output, Minify to compress, or Tree to explore nested structures with collapsible nodes.

  3. 3

    Watch for errors

    A red status badge appears if the input is invalid, with the line and column where the parser failed.

  4. 4

    Copy the result

    Use the Copy button to put the cleaned-up JSON on your clipboard.

Why a good JSON viewer matters

JSON is the lingua franca of modern APIs. When you're debugging a webhook, exploring a third-party response, or comparing two configs, a flat blob of text isn't enough. You need to see the structure — which keys are nested where, how many items are in an array, where the unexpected null came from.

The tree view above lets you collapse uninteresting branches and zoom in on the part of the payload you care about. Strings are green, numbers blue, booleans purple, and nulls gray — so types are obvious at a glance.

Common JSON pitfalls

  • Trailing commas: JSON does not allow them, even though JavaScript does.
  • Single quotes: JSON requires double quotes around strings and keys.
  • Unquoted keys: {name: "Ada"} is invalid; {"name": "Ada"} is valid.
  • Comments: Standard JSON has no comments. If you need them, look at JSON5 or YAML.
  • NaN and Infinity: Not valid JSON values.

Frequently asked questions

Is this JSON viewer safe for sensitive data?+

Yes. The viewer uses your browser's built-in JSON.parse and JSON.stringify. Nothing is uploaded — you can paste API tokens, configuration secrets, or any other sensitive payload safely.

What's the difference between Pretty, Minify, and Tree?+

Pretty formats your JSON with indentation for readability. Minify strips all whitespace to produce the smallest possible output. Tree shows a collapsible, syntax-highlighted view that is ideal for exploring deeply nested structures.

How do I find a syntax error?+

When the input is invalid, the tool shows the parser error along with the line and column where it stopped. The most common issues are trailing commas, unquoted keys, single quotes instead of double quotes, and missing closing brackets.

Can I edit JSON in the tree view?+

The tree view is read-only — it is for exploration. To edit, modify the input box on the left and the tree updates in real time.

How big a JSON file can I paste?+

There is no hard limit, but very large JSON (multi-megabyte) may slow your browser when rendering the tree view. For huge payloads, switch to Pretty or Minify mode for faster rendering.

Keep exploring

More utilities and reading from Toolisk.