JSON formatter and validator

Beautify, minify and validate JSON, with errors shown by line and column.

Output

Result

How to use it

  1. Paste JSON, open a .json file or try the example. It’s checked as you type.
  2. If something’s wrong, you’ll see the line and column, the text around it and what to change. Show in the box jumps straight to it.
  3. Choose Format for readable, indented JSON or Minify for the smallest version, then copy or download the result.

Questions

Why is my JSON invalid?

The usual causes are a trailing comma after the last item, single quotes instead of double quotes, property names without quotes, comments, or a missing comma or bracket. Each of these gets its own message here, pointing at the exact spot.

Is my JSON uploaded anywhere?

No. It’s checked and formatted in your browser, so API responses, configuration files and anything with keys or personal data never leave your device.

Why did a long number change?

JavaScript, and so most JSON tools, can only store whole numbers exactly up to 9,007,199,254,740,991. Longer numbers, such as some database IDs, get rounded. You’ll see a warning when that happens; keep such IDs as strings.

How big a file can it handle?

Files of several megabytes format in well under a second. Very large files skip the colors so typing stays quick; the limit for opening a file is 25 MB.