Skip to content

JSON Formatter & Validator

Format, minify and validate JSON with clear error messages. Runs entirely in your browser.

Runs in your browser. Nothing is uploaded.

Paste JSON to validate it, pretty-print it with your preferred indentation, or minify it. Errors are reported with the line and column where parsing failed. Everything runs locally.

How it works

The tool parses your input with the browser's strict JSON parser. If it is valid you can format it with 2 or 4 spaces or a tab, minify it, or sort object keys alphabetically. If it is invalid, the message shows the position of the first error.

Examples

  • {"name":"MyUtils","tools":[1,2,3]} becomes an indented, readable structure.
  • Trailing commas and single quotes are not valid JSON and are reported as errors.

Frequently asked questions

Is my JSON sent to a server?

No. Parsing and formatting happen in your browser.

Why does my JSON fail validation?

Common causes are trailing commas, single-quoted strings, unquoted keys and comments, none of which are allowed in JSON.

What does minify do?

It removes all unnecessary whitespace to make the JSON as small as possible.

Last updated: