JSON formatter and validator

Pretty-print, minify, and validate JSON with clear error positions.

Runs on your deviceFreeNo account

How to use JSON formatter

Paste JSON. Format pretty-prints with 2-space indents. Minify removes whitespace. If parsing fails, the error message (and position when available) appears above the editor. Copy or download the result.

Paste messy JSON from an API and get indented output — or minify it for production. Invalid JSON shows the parse error so you can fix it fast.

Also searched as json formatter, json validator, pretty print json, minify json. All processing for this tool happens in your tab unless labeled otherwise.

Questions

Trailing commas?

Standard JSON does not allow them. The validator will reject them.

JSON5 or comments?

Not supported. Strip comments first.

Large files?

Multi-megabyte JSON may freeze the tab. For huge logs, use a desktop tool.

Related tools

More text & code people open next.