JSON Formatter

Paste messy JSON and read it properly.

freeworks offlinenothing uploaded
Inputempty
Output

About json formatter

JSON Formatter is one page doing one thing. No account, no settings to sync, no history building up somewhere.

Everything after the first page load is local. Pull the network cable mid-edit and the tool carries on as though nothing happened.

You will find it under JSON, alongside 25 other tools for the same sort of job.

Indent it, minify it, sort the keys, and see exactly where a stray comma broke the parse. Runs in your browser, nothing is uploaded.

How to use it

01
Paste your JSON
Drop it into the panel on the left. It parses as you type, with no submit button.
02
Choose the layout
Set the indent, sort keys to make two files easier to compare, or minify to remove the spacing.
03
Copy the result
One click copies the output. Nothing is stored, so refresh to start over.

Examples

Minified to Pretty
Format a compact JSON object with 2-space indentation
Input
{"name":"Alice","age":30,"roles":["admin","user"],"address":{"city":"Portland","state":"OR"}}
Output
{
  "name": "Alice",
  "age": 30,
  "roles": [
    "admin",
    "user"
  ],
  "address": {
    "city": "Portland",
    "state": "OR"
  }
}
API Response
Pretty-print a typical REST API response payload
Input
{"status":"ok","data":{"id":1,"title":"Hello World","tags":["news","featured"]},"meta":{"page":1,"total":42}}
Output
{
  "status": "ok",
  "data": {
    "id": 1,
    "title": "Hello World",
    "tags": [
      "news",
      "featured"
    ]
  },
  "meta": {
    "page": 1,
    "total": 42
  }
}

Questions

Is my JSON sent anywhere?+

No. The parser runs in your browser, so the payload never leaves your machine. You can use it on production data, and it keeps working with the network off once the page has loaded.

How large a file can it handle?+

A few megabytes is comfortable on a normal laptop. Past that the browser slows down while re-rendering the output, so minify first or split the file.

Why does the error position look wrong?+

The parser reports where it gave up, which is usually just after the real mistake. A missing comma on line 12 often surfaces as an error on line 13.

Does it support JSON5 or comments?+

Not in this tool. Strict JSON only, so anything the standard rejects will be reported as an error rather than quietly fixed.