JSON formatter
Validate, format and minify JSON while preserving number and string tokens.
Check and format JSON
Validate strict JSON, find duplicate keys and format or minify a separate copy. Your file stays in this browser.
Input: up to 512 KiB, 128 nesting levels and 50,000 tokens. Output: up to 2 MiB. UTF-8 files only. A leading BOM is preserved in the download; some JSON consumers reject BOMs. Comments and trailing commas are rejected.
Only whitespace between tokens changes. Number spelling, negative zero, escapes, key order and duplicate keys are preserved. Duplicate keys remain ambiguous for other apps; this tool does not choose a winning value. Formatting uses LF line endings.
Choose a file or paste JSON, then press Check and convert.
Leading UTF-8 BOM preserved.
Result preview
Shows at most the first 8,000 characters. The download contains the complete result. Pasted text is exported as UTF-8; earlier encoding or line-ending bytes cannot be recovered.
Preview shortened to 8,000 characters. Download the complete result.