Convert and format

JSON Formatter

Format messy JSON so it is easy to read, minify it for use in code, or find the exact place where it breaks.

Input: 0 characters, 0 words

Output: 0 characters

How to use it

  1. Paste your JSON into the box.
  2. Choose Format to make it readable or Minify to make it compact.
  3. If the JSON is invalid, the message shows what the parser found.

Examples

InputSettingsOutput
{"name":"Ali","tags":["a","b"]}
Format, 2 spaces
{
  "name": "Ali",
  "tags": [
    "a",
    "b"
  ]
}
{"name": "Ali", "tags": ["a", "b"]}
Minify
{"name":"Ali","tags":["a","b"]}

Common uses

Frequently asked questions

Is my JSON sent anywhere?

No. The formatting happens in your browser. Even so, do not paste live passwords or secret keys into any online tool.

Why does my valid-looking JSON fail?

The most common causes are a trailing comma after the last item, single quotes instead of double quotes, or comments, which JSON does not allow.