← All tools
Free tool

{ }JSON Formatter

Format, validate and minify JSON — errors pinpointed instantly.

Format, validate and minify. Runs entirely in your browser — nothing is uploaded or stored.

// Formatted output appears here

Format, validate and minify JSON — errors pinpointed instantly.

Reading the error position

The position in a parser error is where the parser gave up, which is often just after the actual mistake. A missing comma at the end of one line is frequently reported at the start of the next. Look immediately above the reported point before anything else.

The four usual causes

Trailing commas after the last item in an array or object. Single quotes instead of double. Unquoted keys. Comments.

All four are legal JavaScript and none of them are legal JSON, which is exactly why config pasted out of a source file so reliably fails to parse. JSON looks like a JavaScript object literal and is considerably stricter than one.

When an API response will not parse

Usually the response is not pure JSON. A PHP notice printed before the payload, a byte order mark, a stray blank line from an included file, or an HTML error page returned with a 200 status. View the raw response and check what precedes the opening brace — the answer is normally visible in the first twenty characters.

Comments and key order

JSON has no comments. JSONC and JSON5 add them and standard parsers reject both, which is why a config file using them needs a specific loader.

Key order is preserved as written here, but nothing in the specification guarantees order is meaningful. Do not build logic that depends on it.

Formatting versus minifying

Minify API responses if you like, though gzip removes most of the difference. Keep files that humans edit formatted — a minified config file is a config file nobody will maintain correctly.

Everything runs in the browser, which matters when the payload contains keys or internal endpoints.

This tool is provided free of charge for general information and convenience only. It runs in your browser and we do not store the data you enter. We make no guarantee as to the accuracy, completeness, or suitability of any result, and accept no liability for any loss, damage, or decision arising from its use — use it at your own risk. See our Terms & Conditions.

Enough talk. Let’s launch.

One call. An honest scope, a real timeline, and weekly updates until it ships.