About this tool
This free online JSON formatter beautifies, validates, minifies, and converts JSON — all inside your browser. Your data is never uploaded: every operation runs locally on your machine, which makes it safe to paste API responses, config files, and other data you wouldn't want to send to a random server.
How to use
- Format — paste JSON and get properly indented, readable output with syntax highlighting.
- Validate — check whether the input is valid JSON; errors are reported with the exact position so you can fix them fast.
- Minify — strip all whitespace to get the smallest possible payload for production or transport.
- To YAML — convert JSON to clean YAML, handy for Kubernetes manifests, CI configs, and OpenAPI specs.
Common reasons your JSON is invalid
-
Trailing commas —
{"a": 1,}is legal in JavaScript but not in JSON. - Single quotes — JSON requires double quotes around both keys and string values.
-
Unquoted keys —
{a: 1}must be written as{"a": 1}. -
Comments — standard JSON does not allow
//or/* */comments. -
Special values —
NaN,Infinity, andundefinedare not valid JSON; usenullor strings instead.
FAQ
Is my JSON uploaded to a server? No. Formatting, validation, minification, and YAML conversion all happen in your browser using JavaScript. Nothing leaves your machine.
What's the difference between JSON and YAML? They represent the same data structures. JSON is stricter and ideal for machine-to-machine exchange; YAML is easier for humans to read and edit, which is why configuration files often use it.
How large a file can I format? There is no fixed limit — it depends on your device's memory. Multi-megabyte documents format fine in modern browsers.