Skip to content
ToolKit

DEV-001

JSON Formatter

Paste JSON to reformat it with consistent indentation, collapse it to a single line, or find out exactly where it is invalid. Parsing happens in your browser, so API responses and payloads stay on your machine.

  • Free
  • No signup
  • Private · runs locally

How to format JSON

  1. Paste your JSON into the editor.
  2. Press Format to indent it, or Minify to strip every unnecessary character.
  3. If the JSON is invalid you get the reason and the position of the problem instead of a result.
  4. Copy the output when you are done.

Common JSON errors

Trailing commas are the most frequent cause. JavaScript object literals tolerate them; JSON does not, so {"a": 1,} is invalid.

Keys and strings must use double quotes. Single quotes are valid JavaScript but not valid JSON, and unquoted keys are rejected outright.

JSON has no comments. Anything after // or inside /* */ makes the whole document invalid, which catches people out when copying from a config file.

Values must be a string, number, boolean, null, object or array. NaN, Infinity and undefined cannot appear in valid JSON.

Frequently asked questions

Is my JSON sent to a server?

No. The tool uses your browser's built-in JSON parser. Nothing is transmitted, which makes it safe for payloads containing internal data.

What does minifying JSON do?

It removes all whitespace and line breaks. The data is identical, but the payload is smaller - useful for storage and network transfer.

Can it repair broken JSON automatically?

No. It tells you precisely what is wrong and where, but it will not guess at your intent, because guessing wrong silently corrupts data.

Other tools people use alongside the JSON Formatter.

Browse all developer tools or see every tool.