Format JSON

Paste compact or poorly indented JSON to make it readable, or minify it before embedding it in a build. Syntax errors are flagged immediately.

Example:

How it works

Typically useful when an API response arrives compressed on a single unreadable line: paste it and click "Format" to get an indented version, easy to review and debug. Conversely, before deploying a JSON configuration file, paste its content here to check it's syntactically valid (an error is shown immediately if it isn't) and use "Minify" to produce a compact version ready to be embedded in a build.

Why does my JSON show a syntax error even though it looks correct?

The most common causes are a trailing comma after the last element of an object or array (forbidden in strict JSON), single quotes instead of double quotes around keys and strings, or a key not surrounded by quotes. JSON is a stricter format than the JavaScript object it's inspired by.

What is the difference between JSON and a JavaScript object?

A JavaScript object is a data structure of the language: it can contain functions, comments, unquoted keys and trailing commas. JSON is a text exchange format, more restrictive: keys and strings always in double quotes, no functions, no comments, and no trailing commas allowed.

Formatting and minification happen 100% locally in your browser via WebAssembly — your JSON, whether it contains sensitive data or internal configuration, never leaves your device.