Studio › File › JSON Formatter
Makes JSON readable and points out its errors.
This tool runs on JavaScript. To use it, turn on JavaScript in your browser and reload the page.
The JSON Formatter makes a JSON that has been squeezed onto one line or left untidy readable, and at the same time checks whether it is valid. The indentation can be 2 spaces, 4 spaces or a tab. “Sort keys alphabetically” makes comparing two JSON files easier; even if the same data arrives in a different order, the output is the same. “Squeeze onto one line” does the opposite: it drops the spaces and brings the file down to its smallest form, ready to embed in a configuration or a request. For broken JSON written by hand or copied from JavaScript/Python, the repair option fixes trailing commas, single quotes, comments, unquoted keys and True/False/None on its own; JSON embedded with escapes in a log line opens with a single option too.
If the file is broken, the tool does not just say “invalid JSON”: it shows which line and column the error is on, what was expected and the line itself. A forgotten comma, an extra comma, a single quote or an unclosed bracket is found in seconds that way. Turkish and other Unicode characters are written as they are, without being turned into escape codes. JSON, TXT and LOG files can be uploaded, up to 32 MB. It is used to look through API responses, tidy configuration files and debug. You can upload up to 20 files at once; they are all processed with the same settings, and several files download as a single ZIP.
When an error is found, its position is given as line and column and the faulty line is shown. The repair option fixes only errors whose meaning is clear: it drops a trailing comma, puts single-quoted strings and unquoted keys in double quotes, removes // and /* */ comments, and turns values such as True, False, None, undefined and NaN into their JSON equivalents. The inside of double-quoted strings is never touched; for ambiguous errors such as a missing comma or an unclosed bracket, no guess is made and only the location is reported. How many times each fix was made is shown in the result. The file can be up to 32 MB.
The place where the reader got stuck. The error is usually right there or just before it: a missing comma or an unclosed quote on the previous line is the most common cause.
Standard JSON has no comments; with repair off, a file with comments gives an error. With “Try to repair broken JSON” on, // and /* */ comments are removed, and the result shows how many were removed.
No. Only the order of the keys inside objects changes; the values and the order of arrays stay the same.
No. Your file reaches the server only to be processed and is deleted when the job is done; the output is deleted too once you download it and leave the tool. You don't need an account, a name or an email address, and your files are never sent to a third-party service. It is free to use: we set no hourly or daily quota on the number of jobs, we don't make you watch an ad before processing, and we add no watermark to the output.
About us · Contact · Privacy & KVKK · Cookie Policy · Terms of use