Example

Format a JSON API Response for Debugging

A JSON formatting example for turning compact API output into readable structure while redacting sensitive fields.

The situation

A developer receives a compact API response in a support ticket. The response is valid JSON, but it is hard to read and includes an access token that should be removed before sharing.

Compact JSON input

{"status":"ok","user":{"id":42,"email":"[email protected]"},"token":"redact-this-before-sharing","events":[{"type":"login","ts":1784371200},{"type":"export","ts":1784374800}]}

Workflow

  1. Paste the full JSON value into JSON Formatter.
  2. Format it to reveal the nested user object and events array.
  3. Remove or replace sensitive values such as tokens, emails, and internal IDs before sharing.
  4. Use Timestamp Converter for Unix timestamp fields if the event timeline matters.
  5. Minify the redacted JSON only if the receiving system needs compact text.

Readable redacted JSON

{
  "status": "ok",
  "user": {
    "id": 42,
    "email": "[redacted]"
  },
  "token": "[redacted]",
  "events": [
    {
      "type": "login",
      "ts": 1784371200
    },
    {
      "type": "export",
      "ts": 1784374800
    }
  ]
}

Review checks

Open JSON Formatter Back to examples