🧩 JSON Formatter & Validator

Format · minify · validate with line & column · sort keys — no upload

Advertisement

Paste JSON: get it formatted, minified or validated, with the exact line and column of a syntax error instead of a shrug. The formatter scans characters instead of re-serialising, so a 19-digit ID or a 1e999 survives untouched and your key order is preserved. Copy the result and move on — the JSON never leaves this tab.

Paste JSON above. Nothing is sent anywhere.

What “valid” does and does not mean

Valid means RFC 8259 syntax: no trailing commas, no comments, no single quotes, keys always double-quoted. A JSON5 or JavaScript object literal will be rejected here — and by every strict parser that receives it, so the error is worth knowing before it reaches production. The most common real-world faults are a trailing comma after the last member, an unquoted key, and a UTF-8 BOM that arrived with a file copy (the parser sees three invisible bytes and reports a position 0 error).

Sort keys is the one action that rebuilds the object through JSON.parse and JSON.stringify. That means duplicate keys collapse to the last value and integers beyond 253 lose precision — a real hazard for database IDs and 64-bit timestamps. Object keys that look like array indices are also always listed first by JavaScript engines, whatever the sort order, so a perfectly sorted object can still print numerically in front. The other three buttons never parse numbers again and cannot cause either problem. Nothing here sends your payload anywhere: check the network tab while you use it.

Part of Everyday Tools. Hashing a payload or a file instead? The checksum tool covers MD5 through SHA-512.

Advertisement
Advertisement