Skip to content
JSON Viewer

Pretty print JSON

JSON Formatter & Beautifier

Turn a single line of minified JSON into neatly indented, syntax-highlighted text. Choose your indentation, sort keys alphabetically, then copy or download the result.

InputWaiting for JSON

The beautified JSON and tree appear here as soon as your input is valid.

0 B0 linesLn 1, Col 1

Load JSON from a URL

Your browser fetches it directly; it does not pass through our servers. The site must allow cross-origin requests.

How it works

How to use the JSON Formatter

  1. 01

    Paste your JSON or open a file.

  2. 02

    Pick 2 spaces, 4 spaces or tabs, and turn on “Sort keys” if you want stable, diff-friendly output.

  3. 03

    Press Format, then Copy or Download the beautified JSON.

FAQ

Frequently asked questions

What does a JSON formatter do?

It re-writes JSON with consistent line breaks and indentation without changing the data. The output is easier to read, review and diff.

Should I indent with 2 spaces, 4 spaces or tabs?

Two spaces is the most common choice for JSON on the web and in JavaScript projects. Four spaces suits Python and Java teams. Tabs let each reader choose their own width. All three produce valid JSON.

Why sort keys?

JSON objects have no defined key order. Sorting keys alphabetically gives the same output for the same data, which makes diffs and code reviews much cleaner.

Is my JSON uploaded to a server?

No. All parsing, formatting and validation happens in your browser with JavaScript. Nothing you paste or open is sent to us or stored on a server. Share links keep the JSON inside the URL fragment (after the #), which browsers never send to servers.

Tools