Format compact JSON
Input
{"name":"ajx.io","tools":12,"tags":["json","private"]}Output
{
"name": "ajx.io",
"tools": 12,
"tags": [
"json",
"private"
]
}Format, minify and validate JSON in your browser, with the line and column of any error.
Everything happens on your device. What you type never leaves it.
This tool needs JavaScript to run
This tool formats, minifies and validates JSON. Paste or type JSON on the left and the result appears on the right as you type. Format adds indentation so the structure is easy to read; Minify removes every space and line break that is not inside a string, so the text is as short as it can be.
If the JSON is not valid, you are told what is wrong in plain language, with the line and column where it goes wrong, so you can fix it without hunting. Strings and numbers are kept exactly as you wrote them: a long number is never rounded and an escape such as \u00e9 is never rewritten.
Everything happens on your device. What you paste is never sent to a server, so it is safe to use with tokens, configuration and customer data. After your first visit the tool also works with no connection.
{"name":"ajx.io","tools":12,"tags":["json","private"]}{
"name": "ajx.io",
"tools": 12,
"tags": [
"json",
"private"
]
}{
"id": 7,
"active": true,
"notes": null
}{"id":7,"active":true,"notes":null}{
"id": 7,
}Unexpected comma at line 2, column 10. Remove it or add another value.
No. The JSON is read and written by code running in your browser. Nothing is sent to ajx.io or to anyone else, and the tool keeps working if you go offline.
Format indents the JSON with 2 spaces, 4 spaces or a tab so a person can read it. Minify removes all the whitespace outside strings so it is as small as possible, which is useful for requests and configuration files.
No. Numbers and strings are copied exactly as written, so a number with more digits than a program can hold, such as 12345678901234567890, keeps every digit and an escape such as \u00e9 stays as it is.
JSON does not allow a comma after the last item in an object or array. The message gives the line and column of the comma. Remove it, or add the value that should follow it.
Repeating a key is still valid JSON, so the document is accepted and both entries are kept. The tool tells you which key is repeated and where, because most programs keep only the last value.