HexaConvert

JSON Formatter & Validator

Beautify, minify and validate JSON. Syntax errors are reported with the exact line and column so you can jump straight to them.

About this tool

Formats JSON so it can be read, and tells you where it breaks when it cannot be parsed. Indent a minified API response to inspect it, or minify a config file before shipping it.

How to use it

  1. 1Paste your JSON.
  2. 2Format it to indent and align, or minify it to strip every unnecessary byte.
  3. 3If it will not parse, read the error, which names the position that failed.

Good to know

Validation comes with the formatting

Anything that formats is valid JSON by definition, since it had to parse first. The commonest failures are a trailing comma, a single quote where a double belongs, and an unquoted key, none of which JSON allows even though JavaScript does.

Key order is preserved

Keys stay in the order they arrived. JSON objects are unordered by specification, but every practical parser keeps insertion order and reordering them would make diffs unreadable.