Skip to content
Calculator Tools
Developer Tools

JSON Formatter

Format, indent or minify JSON, with a structure summary and clear error messages.

Enter values

Results update as you type.

Result

Output

{ "name": "calcularo", "tags": [ "fast", "free" ], "meta": { "version": 2, "active": true } }

Original size
78 B
Output size
119 B
Saved by minifying
0.0%
Keys
5
Nesting depth
3
Objects and arrays
2 objects, 1 arrays

About the JSON Formatter

Paste JSON and this tool reformats it with the indentation you want, or strips every unnecessary byte for production. It also reports the structure — how many keys, how deeply nested, how much smaller minifying makes it — and if the JSON is broken it tells you the line and column where parsing stopped.

Also known as: json beautifier, json pretty print, format json, json minifier, prettify json.

How to use this calculator

  1. Paste the JSON into the box.
  2. Choose formatted, minified or key-sorted output.
  3. Copy the result — nothing is uploaded anywhere, it all runs in your browser.

Formula

JSON.parse then JSON.stringify with your chosen indentation

Worked example

Using the values pre-filled in the calculator above:

  • JSON: {"name":"calcularo","tags":["fast","free"],"meta":{"version"…
  • Output: Formatted
  • Indent: 2 spaces

the calculator returns:

  • Output: { "name": "calcularo", "tags": [ "fast", "free" ], "meta": { "version": 2, "active": true } }
  • Original size: 78 B
  • Output size: 119 B
  • Saved by minifying: 0.0%

Frequently asked questions

Is my JSON sent to a server?

No. The formatting runs entirely in your browser, so you can safely paste configuration or API responses.

Why does my JSON fail to parse?

The usual culprits are trailing commas, single quotes instead of double quotes, and unquoted keys — none of which are valid JSON.