Know your formats
Supported formats and limitations
- Input formats
- JSON
- Output formats
- JSON
- The formatter checks strict JSON syntax and supports up to 64 levels. It preserves duplicate keys and numeric tokens.
Formatting validates strict JSON syntax before changing whitespace. Choose two spaces, four spaces or compact output, then copy or download the result. Original number and string tokens and duplicate keys remain in the file. The preview is truncated for large results, while downloads contain the full output.
Maximum input size is 2 MiB per file.
A local workflow
How to use this converter
Your file contents stay in the browser as you work.
Paste JSON or select a file.
Choose two spaces, four spaces or compact formatting.
Review, copy or download the formatted JSON.
A little more clarity
Frequently asked questions
Will the formatter repair syntax errors?
Fix the reported error in the source, then format again. Strict JSON requires double-quoted keys and disallows comments and trailing commas.
Is JSON Formatter available now?
This tool runs locally with JavaScript enabled. Check its supported formats and size limits before converting.