JSON beautifier
Make JSON easier to read. Paste text or choose a file, pick an indentation style, and copy or download the formatted result. Everything runs in your browser.
.json and .txt files up to 10 MB
Paste JSON, drop a file here, or choose a .json or .txt file. Your data stays in this browser.
Formatted JSON will appear here.
How it works
The beautifier checks that your input is valid JSON, then adds line breaks and indentation. Choose 2 spaces, 4 spaces or tabs. Compact removes optional whitespace when you need a smaller text file. The output can be copied or downloaded as .json.
Objects, arrays, strings, numbers, booleans and null are accepted at the top level. Integer digits larger than JavaScript can safely represent are preserved. As with JSON parsing generally, duplicate object keys collapse to their last value, and object keys made only of integer digits may be reordered.
For invalid JSON, the message points to a line and column and suggests a fix for common problems such as trailing commas, single quotes and unquoted keys. JSON Lines, comments and JSON with trailing commas are not accepted as standard JSON. Files up to 10 MB are processed locally in a Web Worker; large files may use substantial memory on a phone.