JSON formatter

Paste JSON to indent it, squeeze it into one line, or find out exactly where it breaks.

Runs in your browser. Nothing you enter is sent to our server.

About this tool

An API response or config on one line is hard to read. Formatting adds line breaks and indentation (2 or 4 spaces, or tabs); minifying strips whitespace before you send or store it.

Unlike many formatters, this one does not round-trip your data through JSON.parse, so numbers like 12345678901234567890 stay exactly as written and duplicate keys are not lost. Everything runs in your browser.

How to use

  1. Paste JSON into the input or click “Insert example”.
  2. Choose the indentation and click “Format” or “Minify”.
  3. Copy the result. If the JSON is invalid, you will see the line, column and reason.

Examples

Input
{"name":"WDSQD","tools":[1,2]}
Result
{
  "name": "WDSQD",
  "tools": [
    1,
    2
  ]
}
Input
{"a": 1,}
Result
Line 1, column 9: trailing comma before a closing brace

Frequently asked questions

Is it safe to paste work data here?

Formatting happens in your browser and nothing is uploaded. Still, avoid pasting passwords or keys into any online service unless you need to.

Why is JSON with single quotes an error?

The JSON standard only allows double quotes. Single quotes, comments and trailing commas are JavaScript features, not JSON.

Is there a size limit?

There is no fixed limit; it depends on your device memory. Files of several megabytes are fine.