Turn compact JSON into neatly indented text that humans can read.
Loading the tool...
How to use JSON Pretty Print
Paste your compact JSON on the left.
Choose the indent size from the dropdown.
Copy the pretty printed result or download it as a file.
About JSON Pretty Print
Pretty printing means adding line breaks and indentation so that the structure of the data is visible at a glance. The content stays identical. It is the first thing most of us do with an API response before reading it.
Choose the indent that matches your team. Two spaces is the common default in JavaScript projects, four is popular in Python and Java, and tabs are great when everyone sets their own width.
Frequently asked questions
Does pretty printing make the file bigger?
Yes, because of the extra whitespace, usually by 20 to 40 percent. For storage or network transfer you can minify the JSON again with the JSON Minify tool.
Which indent should I use?
Match whatever your project already uses. If you are writing a config file for others, two spaces is the safest choice, it keeps deeply nested data from drifting off the screen.
Will it keep the order of my keys?
Yes. Keys stay in the order you wrote them unless you turn on sorting in the JSON Formatter.
What if my JSON is invalid?
You will see a message with the line and column. Fix JSON can repair common problems such as trailing commas and single quotes.