JSON Formatter
Paste JSON to pretty-print it with the indentation you prefer, or switch to compact output. Formatting works on the original text, so large numbers and key order are kept exactly as written.
Paste JSON, open a file or load the sample.
Formatted output
How to format JSON
- Paste or type your JSON into the input editor, or load the sample.
- Choose an indentation: 2 spaces, 4 spaces or tabs, or switch to Minify.
- Fix any error shown below the input. The message includes the line and column.
- Copy the formatted result or download it as a .json file.
Frequently asked questions
Does the formatter change my numbers or key order?
No. DevKOM re-indents the JSON token by token instead of parsing and re-serialising it, so large integers such as 12345678901234567890, duplicate keys and key order stay exactly as you wrote them. Only the optional Sort keys mode parses the data.
How large a JSON file can I format?
Several megabytes format in well under a second on a typical laptop. The practical limit is your device's memory; very large files (50 MB and up) may make the editor sluggish.
Is my JSON sent to a server?
No. Parsing and formatting happen in JavaScript on your device. DevKOM has no backend that could receive it.
Related tools
- JSON ValidatorCheck JSON syntax and see exactly where it breaks.
- JSON MinifierStrip whitespace from JSON and see the size saved.
- YAML FormatterValidate YAML and convert between YAML and JSON.
More in Code & Data.