JSON Formatter

Paste JSON to validate, pretty-print, or minify it — with clear error locations.

Paste JSON

What this checks

It runs your input through a strict JSON parser — the same rules any API or config file that expects real JSON will enforce — and reports either the formatted result or exactly where parsing failed. Nothing here is JavaScript-flavored leniency; if it's not valid JSON, it's flagged.

Frequently asked questions

Does my JSON get sent anywhere?

No — parsing and formatting both happen entirely in your browser. Nothing you paste here is sent to a server.

What's the difference between Format and Minify?

Format pretty-prints with 2-space indentation, for reading or editing. Minify strips all unnecessary whitespace down to the smallest valid representation, for shipping over the wire or embedding in code.

Why does it show a line and column number for errors?

JSON.parse only reports a raw character position by default, which is hard to act on in a large file. This tool converts that position into a line and column so you can jump straight to the actual problem in your editor.

It says invalid, but the JSON looks fine to me — what's a common cause?

The most frequent culprits are a trailing comma after the last item in an object or array (valid in JavaScript object literals, but not in strict JSON), single quotes instead of double quotes around strings and keys, or an unquoted key name.

Related tools

Command Palette

Search for a command to run...