Skip to main content
Developer toolsLocal in browser — nothing is uploaded

JSON formatter & validator

Format, minify, and validate JSON syntax directly inside your browser with exact line and column diagnostics.

0 chars

Processing runs inside your browser without accounts or server uploads. Modular TypeScript domain logic tested locally.

Report a problem with this tool

Supported capabilities

Formatting & indentation: Pretty-prints valid JSON using 2 spaces, 4 spaces, or tab indentation, or minifies whitespace into a single compact string.

Strict syntax validation: Uses native JSON.parse paired with a deterministic RFC 8259 scanner to report exact line numbers, column numbers, and the offending line.

Export & byte size: Displays exact UTF-8 byte counts before and after formatting or minification, and exports valid output as a .json file.

Privacy & technical boundaries

Zero network transmission: JSON payloads frequently contain API responses, configuration, or sample records. Nothing you paste or download ever leaves browser memory.

RFC 8259 rules: Trailing commas, single-quoted strings, and JavaScript comments are invalid in strict JSON and are intentionally flagged as syntax errors.

Frequently asked questions

Does the formatter change key order or number formatting?
Standard JSON objects do not guarantee key order, though modern JavaScript engines preserve insertion order for non-integer keys. Extremely large integers beyond IEEE 754 safe precision (2^53 - 1) are parsed as standard JavaScript numbers.
Why are trailing commas marked invalid?
Standard JSON (RFC 8259) forbids trailing commas in arrays and objects, as well as comments and single quotes. The validator enforces standard JSON strictly so payloads remain safe for strict parsers.