Toolbench

JSON Formatter & Validator

Pretty-print, minify and validate JSON, with the line and column of the first error.

Runs entirely in your browser. Nothing you enter is uploaded.

How to use

  1. Paste your JSON into the input box.
  2. Press Format to pretty-print it, or Minify to compress it.
  3. If the JSON is invalid, the error message shows the line and column.
  4. Copy the result or download it as a file.

Example

{"name":"Ada","skills":["PHP","SEO"]} becomes a neatly indented block you can read at a glance.

About this tool

Everything runs in your browser. The validator follows the JSON standard strictly, so trailing commas, single quotes and comments are reported as errors.

Frequently asked questions

Is my JSON sent anywhere?

No. It is parsed in your browser and never leaves your device.

Why does a trailing comma fail?

Standard JSON does not allow trailing commas, comments or single-quoted strings. The error shows where the problem is.

Can I sort the keys?

Yes. Tick "Sort keys" before pressing Format.

Related tools