JSON Formatter
Paste any JSON to pretty-print, minify, or validate it — errors point to the exact line and column.
Input
Output
Validate and format JSON in seconds
Paste any JSON — an API response, a config file, a log line — and format it into clean, readable, 2-space-indented output, or minify it down to a single line for production. If the JSON is invalid, the exact line and column of the problem is shown immediately, so you don't have to hunt through nested brackets by eye.
What counts as valid JSON
Valid JSON requires double-quoted keys and strings, no trailing commas, and only a fixed set of value types: objects, arrays, strings, numbers, booleans, and null. A trailing comma after the last item, single quotes, or an unquoted key are the most common reasons JSON from a quick edit fails to parse.
Also useful: Regex Tester and Unix Timestamp Converter.
Frequently asked questions
The most common causes are a trailing comma after the last item in an object or array, single quotes instead of double quotes, or an unquoted object key — all valid in JavaScript object literals, but not in strict JSON.
No — formatting and validation both run entirely in your browser using the built-in JSON parser. Nothing you paste here is transmitted or stored.
Formatting adds 2-space indentation and line breaks for readability during development. Minifying strips all unnecessary whitespace to produce the smallest possible payload for production use.