JSONProbe

JSON Beautifier

Beautify or pretty print JSON in the browser. Indentation and line breaks are added and nothing else is changed — including the number you did not expect to be watched.

Input empty
Drop a.json file here — read locally, never uploaded
Result

          

Ctrl / Cmd + Enter formats as well.

Beautify, pretty print, format, prettify, indent: these are the same operation, and a site that has a different page for each name is chasing keywords, not offering features. This page and the formatter page run identical code, so the output is identical too.

What "beautify" can quietly do to your data is the part worth reading before you paste a production payload in. The rules are on the formatter page and they apply here unchanged: whitespace is added, and integers outside ±(2^53 − 1) can lose digits on the way through.

What beautifying changes, precisely

Beautifying is parse, then re-serialise. That means the output is guaranteed to differ from the input in exactly the ways a parser and serialiser introduce, and nothing else:

Doing the same thing in a terminal

# Python
python3 -m json.tool in.json out.json

# jq
jq . in.json > out.json

# Node
node -e 'const f=require("fs"),p=process.argv[1];
  f.writeFileSync(p, JSON.stringify(JSON.parse(f.readFileSync(p,"utf8")),null,2))' in.json

All three are faster than a web page for a file that is already on disk, and two of them give you an exit code, which is what CI needs. The page wins when the JSON is in a clipboard, when you want to look at the structure rather than read it, or when the file is large enough that opening it in an editor is the mistake.

Frequently asked questions

Will beautifying change my values?

Strings and structure, no. Numbers, possibly: integers outside ±(2^53 − 1) can lose digits, large magnitudes switch to exponent form, and duplicate keys collapse to the last occurrence. If exact numbers matter, send them as strings.

Is beautify different from format?

No. Same operation, same output. Treat "beautifier", "pretty printer", "prettifier" and "formatter" as synonyms — on this site they literally share one implementation.

Why did my file get bigger after beautifying?

Because it was minified, and indentation is bytes. A 2-space pretty print of a repetitive payload typically grows around 65% relative to the minified form — the inverse of the ~40% a minifier saves. Store and transmit minified; read pretty.

Can it do a batch of files?

No — the page has no filesystem access beyond the files you drop on it, and dropping fifty files to have them processed one at a time is a worse answer than a two-line script. Use python -m json.tool in a loop.

Related tools