Toolcedar

JSON Formatter

Format, validate and minify JSON in your browser. Paste messy JSON, get readable output with a clear message when something is wrong.

How to use the JSON Formatter

  1. Paste your JSON. Drop the raw JSON into the input box. It is checked as you type.
  2. Choose the shape. Pick an indent size, or switch to minified to strip every space.
  3. Copy the result. Copy the formatted output straight to your clipboard.

Frequently asked questions

Is my JSON uploaded anywhere?
No. Parsing and formatting happen entirely in your browser with the built-in JSON parser. Nothing is sent over the network, which makes it safe to paste payloads that contain production data.
Why does my JSON fail to parse?
The usual causes are trailing commas, single quotes instead of double quotes, unquoted keys, and comments. All four are valid JavaScript but none of them are valid JSON, so a parser rejects them.
What is the difference between formatting and minifying?
Formatting adds indentation and line breaks so a human can read the structure. Minifying removes every optional space so the payload is as small as possible over the wire. The data itself is identical either way.
Does formatting change the order of my keys?
No. Key order is preserved exactly as it appears in your input, because JSON objects keep insertion order when parsed and re-serialised.

Learn more

Last updated