> codebench_TOOL: HomeLOCAL-ONLY⌘K Switch

JSON Formatter

Tool guide

Pretty print / minify JSON

Input: This tool processes input in your browser. Check in Network (opens in a new tab)

Mode:
Indent:
Input (JSON)
Output (Pretty)
Paste JSON on the left, then press ⌘Enter

Paste your JSON and get instant formatting with 2 or 4 space indentation, optional key sorting, and one-click minification. The formatter reads the pasted JSON in your browser, without uploading it.

How to use it

  1. Paste the compact status payload into the left editor.
  2. Select Pretty Print, set Indent to 2 spaces, and enable Sort Keys. Click Run.
  3. Compare the right editor with the original: count now appears before status. Copy the result into a review or fixture if you want that order to be consistent across runs.

Worked example

Example input
{"status":"ready","count":2}
Example output
{
  "count": 2,
  "status": "ready"
}

The newlines and key order are presentation changes. count is still a JSON number and status is still a string.

What to watch for

Paste strict JSON, not a JavaScript object literal. Use double quotes around keys and strings, and remove comments and trailing commas before running.

Frequently asked question

Does pretty-printing prove that this payload matches my API contract?
No. The formatter checks whether it can parse the text; it does not check whether count is required or whether the API accepts ready as a status.

Browse JSON tools

> codebench $Ctrl+Enter Run