Format JSON online: pretty print, minify and sort keys
Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. Download, no sign-up →
A one-line API response is unreadable, and for a log you need to squeeze it back. Here both take one click, without uploading data to someone else’s server.
How to use it
Paste JSON or open a file up to 20 MB. Pick an indent and click Format or Minify. “Sort keys alphabetically” orders keys at every level; the order of array elements stays the same. Copy the result or download it as a file.
If the JSON is invalid
The page shows the line, the character and the cause. Most often it is a comma after the last element, single quotes instead of double, comments or unquoted keys: JSON forbids all of these, even though JavaScript and the JSON5 format allow them. If an HTML page came back instead of JSON, the response starts with <!DOCTYPE.
Long numbers
A browser keeps numbers to about 15–16 significant digits. An identifier such as 12345678901234567890 becomes 12345678901234567000 after formatting. If your data has such numbers, do not reformat it in a browser, and ask developers to send them as strings.
Sorting helps comparison
Two responses with the same data in a different key order look different. After sorting they are easy to compare by eye, and the JSON comparison page gives an exact field-by-field diff. A script in your browser does the work; the page sends nothing to a server.
Repeat this on your own API
Checkcraft is a desktop app that saves API response checks without code and shows what did not match. Start with a sample, then use your own sanitized data. Free runs on Windows and Linux with no time limit.
Download FreeDownload and first runNo sign-up or email needed, the archive is ready in a couple of minutes. See the edition limits.
Start with the linked example and compare its result with your own test requirement.