JSON formatter
Pretty-print, minify, or sort keys, and show the parse error if the JSON is bad.
A green state means the current text parsed. It does not mean the JSON matches a schema.
Paste JSON to pretty-print it, minify it, or sort the keys. If the text is not valid JSON, the page shows the parse error. A successful parse does not mean the JSON matches a particular schema.
- 1Paste JSON.
- 2Choose indent, minify, or sort.
- 3Copy the result. Fix the error text if it is red.
Rate this tool
Questions
- Does sort change arrays?
- Array order stays. Object keys are sorted at every level.
- Are comments allowed?
- No. JSON does not allow comments, and the error will say so.
- Nothing is uploaded. Closing the tab drops the file.
- Parsing is JSON.parse in the page.