JSON formatter & validator
Format, minify, and validate JSON syntax directly inside your browser with exact line and column diagnostics.
Processing runs inside your browser without accounts or server uploads. Modular TypeScript domain logic tested locally.
Report a problem with this toolSupported 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.
Related tools
Browse all toolsDeveloper tools
JSON Schema validator
Validate JSON payloads against a JSON Schema (types, required fields, bounds, patterns, nested items) locally.
Spreadsheets & data
YAML formatter & YAML <-> JSON
Parse, validate, pretty-format YAML manifests, or convert cleanly between YAML and JSON directly in your browser.
Spreadsheets & data
CSV <-> JSON converter
Convert CSV tables to typed JSON arrays or flatten JSON object arrays back into RFC 4180 CSV locally.