JSON Formatter · Browser Tool

JSON Formatter Online

Format, minify, inspect, copy, and download JSON in your browser. Choose indentation, see a tree view, and get a readable error location when the input is invalid.

Local by default: the formatter processes pasted JSON in this browser tab. Do not paste secrets into any online tool unless your own policy allows it.

PRETTYMINIFYTREEERROR
{ }

Readable JSON

Keep structure visible while debugging payloads.

Local JSON workspace

Format or compress a JSON document.

Paste JSON, choose an indent size, then use the action that matches your next step. Empty input and invalid JSON stay visible instead of being silently discarded.

Input JSON

Formatted output

Paste JSON or load the example to begin.

Parse result

No JSON has been parsed yet.

Tree view

The parsed structure will appear here.

How to format JSON

  1. Paste a complete JSON object or array.
  2. Choose indentation, then click Format JSON or Minify JSON.
  3. Check the parse message and tree view.
  4. Copy or download the result.

JSON formatter error locations

The browser syntax message is shown with an approximate line and column when available. This helps locate a missing comma, quote, bracket, or colon while keeping the original input unchanged.

JSON formatter FAQ

Is this JSON formatter private?

Formatting, minifying, parsing, and tree rendering run locally in your browser. Avoid passwords, access tokens, or private customer data.

What is the difference between pretty JSON and minified JSON?

Pretty JSON adds whitespace for people to read. Minified JSON removes unnecessary whitespace while preserving the same data structure.

Why is my JSON invalid?

Common causes are trailing commas, single quotes, unquoted keys, missing brackets, and comments. JSON does not support JavaScript-style object syntax.

Can I see nested JSON as a tree?

Yes. After a successful parse, expandable object and array nodes appear in the tree view.