JSON Formatter and Validator

Paste JSON to pretty-print it, check it's valid, or minify it to save bytes, all without sending your data to a server.


Runs entirely in your browser. Nothing you enter is sent anywhere.

How it works

The input is parsed with the browser's own JSON parser, so the result matches what your JavaScript code will accept. If parsing fails, the error position is converted into a line and column.

Minifying removes all whitespace, which matters for bandwidth-limited links: a pretty-printed sensor payload can be 20–40% larger than the minified version.

Valid JSON: double-quoted keys and strings, no trailing commas, no comments

Worked example

Pasting {"device":"lathe-04","state":"running","current":12.4} and choosing 2-space indentation prints each key on its own line. That pretty-printed version is 67 bytes; minifying it brings it back to 54 bytes, about 20% smaller.

Frequently asked questions

Why is my JSON invalid?

The most common causes are single quotes instead of double quotes, a trailing comma after the last item, unquoted keys, and comments, none of which are allowed in standard JSON.

Is my data uploaded anywhere?

No. Formatting happens entirely in your browser.

Related tools