JSON formatter and validator

Paste JSON to pretty-print, minify or validate it. Runs entirely in your browser: nothing you paste is uploaded, stored or logged.

By the HookWatcher team · Updated

Formatted JSON
{
  "id": "evt_1042",
  "type": "payment_intent.succeeded",
  "data": {
    "object": {
      "amount_received": 4999,
      "currency": "usd",
      "metadata": {
        "order_id": "ord_1042"
      }
    }
  }
}

Reading the error

When the input isn't valid JSON, the tool shows the line and column where parsing stopped. The real mistake is usually just before that point:

Common JSON syntax errors
MistakeExampleFix
Trailing comma{"a": 1,}Remove the last comma
Single quotes{'a': 1}JSON strings use double quotes
Unquoted key{a: 1}Quote every key
Comment{"a": 1 // note}JSON has no comments
NaN or undefined{"a": NaN}Use null or a number
Logged object, not JSON{ a: 1, b: [Object] }Log with JSON.stringify, or copy the raw body

Sorting keys

Sorting keys makes two payloads easier to compare by eye. It changes the bytes, so never use a sorted or re-indented copy to test signature verification: signatures cover the original body exactly. To compare payloads properly, use the JSON diff.

Capture a real JSON payload

Send a webhook to a free endpoint and read its JSON in a searchable tree, with copy-path for every field.
Get a free webhook URL No account or card needed. Want to keep it? Create a free account