Skip to content
Kural

JSON formatter and validator

Beautify, minify and validate JSON with exact error positions.

For API responses, config files and JSON copied out of logs. Broken input gets the line and column of the first error, which is usually a missing comma, a trailing comma or an unquoted key.

How to use

  1. Paste or type JSON in the left field.
  2. Pick the indentation: 2 or 4 spaces, tabs, or Minify to remove all whitespace.
  3. Optionally sort the keys alphabetically to compare two objects easily.
  4. Copy the result or download it as data.json.

Examples

Common error: trailing comma
{"a": 1, "b": 2,}  →  Invalid JSON — line 1, column 17
Minify
{
  "ok": true
}  →  {"ok":true}

Frequently asked questions

Why is my JSON invalid?

The most frequent causes are trailing commas, single quotes instead of double quotes, unquoted keys, comments and NaN/undefined values. JSON allows none of them.

Is there a size limit?

No fixed limit, only your device’s memory. A few megabytes is no problem on an ordinary laptop or phone.