Text tool
Format and validate JSON.
Paste anything and get it formatted, or get an error with the exact line and column instead of a vague complaint.
- Free, no sign-up
- Nothing is uploaded
- No watermark, no limits
JSON formatter
FreeFormatted JSON appears here.
Worth knowing
How to get this right.
-
01
The four things that break JSON
A trailing comma after the last item. Single quotes instead of double. Unquoted keys. A comment. All four are legal in JavaScript and none are legal in JSON, which is why hand-edited config files break so often. The error above gives you a line and column so you can go straight to it.
-
02
Minify for the wire, format for people
Minified JSON saves real bytes on an API response. Formatted JSON saves real minutes when something goes wrong. Store and edit the formatted version; serve the minified one — and if it is going over HTTP, gzip closes most of the gap anyway.
-
03
Depth is a design smell
The result panel reports nesting depth. Past four or five levels, most consumers of your JSON will be writing defensive code to walk it. That is usually a sign the shape wants flattening, not that the reader needs to try harder.
Questions
About this tool.
Need this built into something?
These are the small pieces. We build the systems they belong to.