JSON formatting
JSON Formatter & Validator
Paste JSON to check syntax, indent it, or minify it to one line. Results are never uploaded.
Parsing and formatting run 100% client-side in your browser; no payloads or secrets are transmitted
JSON source
Paste and validate
Processing stays in this browser. Never paste production secrets into an untrusted page.
Result
Copyable JSON
{
"project": "hugsy",
"tools": ["format", "validate"],
"private": true
}How it works
Validate the structure before formatting it.
JSON object keys and strings require double quotes. Trailing commas, single quotes, and comments are not valid standard JSON.
The tool validates with the browser JSON parser, then serializes again. Formatting changes whitespace and line breaks, not values or array order.
Standard JSON supports object, array, string, number, true, false, and null—not undefined, NaN, or functions.
FAQ
JSON Formatter & Validator · FAQ
Does formatting send JSON to a server?
No. Parsing, indentation, and minification run in this browser.
Why does a JavaScript object work when JSON fails?
JavaScript object literals allow syntax JSON rejects, including unquoted keys, single-quoted strings, and trailing commas.
Does formatting change key order?
The tool outputs properties in the browser parser’s order, which usually preserves input order. Do not use JSON key order for business meaning.