{
  "slug": "har-body-stripper",
  "name": "gizza-ai/har-body-stripper",
  "version": "0.1.0",
  "title": "HAR Body Stripper — remove request & response bodies — gizza.ai",
  "description": "Remove request and response bodies from a HAR capture to shrink it and clear payloads before sharing. Filter by side, mimeType, or size — all in your browser.",
  "tags": [
    "har body stripper",
    "shrink har file",
    "remove response bodies from har",
    "har file too big",
    "clean har file",
    "har sanitizer",
    "http archive",
    "har privacy"
  ],
  "category": "network",
  "urls": {
    "page": "https://gizza.ai/tools/har-body-stripper/",
    "markdown": "https://gizza.ai/tools/har-body-stripper/index.md",
    "descriptor": "https://gizza.ai/tools/har-body-stripper/tool.json",
    "deep_link_example": "https://gizza.ai/tools/har-body-stripper/?har=%7B%22log%22%3A%7B%22entries%22%3A%5B%7B%22request%22%3A%7B%22method%22%3A%22POST%22%2C%22url%22%3A%22https%3A%2F%2Fexample.com%2Fapi%2Flogin%22%2C%22postData%22%3A%7B%22mimeType%22%3A%22application%2Fjson%22%2C%22text%22%3A%22%7B%5C%22user%5C%22%3A%5C%22alice%5C%22%7D%22%7D%7D%2C%22response%22%3A%7B%22status%22%3A200%2C%22content%22%3A%7B%22size%22%3A20%2C%22mimeType%22%3A%22application%2Fjson%22%2C%22text%22%3A%22%7B%5C%22session%5C%22%3A%5C%22abc123%5C%22%7D%22%7D%7D%7D%5D%7D%7D&strip=both&only_mime=image%2F%2Cfont%2F&min_bytes=0&output=har&pretty=true"
  },
  "cli": "gizza tool har-body-stripper '{\"log\":{\"entries\":[{\"request\":{\"method\":\"POST\",\"url\":\"https://example.com/api/login\",\"postData\":{\"mimeType\":\"application/json\",\"text\":\"{\\\"user\\\":\\\"alice\\\"}\"}},\"response\":{\"status\":200,\"content\":{\"size\":20,\"mimeType\":\"application/json\",\"text\":\"{\\\"session\\\":\\\"abc123\\\"}\"}}}]}}'",
  "tool": {
    "description": "Remove the request and response bodies from a HAR (HTTP Archive) capture to drastically shrink it and clear payload data before sharing: request postData (form fields, JSON uploads), response content text, and Chrome websocket frame payloads. URLs, headers, cookies, timings, and size metadata are untouched, so the capture stays analyzable and diff-able (key order preserved). Choose the side with strip=both/request/response, limit by mimeType substrings (only_mime=image/,font/) or size (min_bytes), and get the stripped HAR JSON (compact by default, pretty=true to indent) or a dry-run summary (output=summary) with counts, bytes removed, and before/after size. Note: cookies and auth headers are NOT redacted — this tool only removes bodies. Runs locally; max 10000 entries.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "har": {
          "description": "The HAR (HTTP Archive) capture as JSON text — the { \"log\": { \"entries\": [ … ] } } object that browser DevTools export via Network tab → \"Save all as HAR\". Max 10000 entries.",
          "type": "string"
        },
        "min_bytes": {
          "default": 0,
          "description": "Only strip bodies at least this many bytes, e.g. 10240 to keep small API JSON but drop big blobs. Response bodies measure content.size when recorded (decoded size), else the stored text length; request bodies measure the stored postData length. Default 0 = strip all.",
          "minimum": 0,
          "type": "integer"
        },
        "only_mime": {
          "default": "",
          "description": "Comma-separated case-insensitive mimeType substrings, e.g. image/,font/,video/ — only bodies whose recorded mimeType contains one are stripped. Empty (default) strips every body. Bodies with no recorded mimeType are kept when a filter is set.",
          "type": "string"
        },
        "output": {
          "default": "har",
          "description": "'har' (default) returns the stripped capture as JSON, ready to save as a .har file. 'summary' is a dry-run report instead: entries scanned, bodies stripped per side with bytes removed, and the before → after size.",
          "enum": [
            "har",
            "summary"
          ],
          "type": "string"
        },
        "pretty": {
          "default": false,
          "description": "Pretty-print the output HAR with 2-space indentation. Default false = compact single-line JSON, which shrinks the file the most (DevTools exports are pretty-printed).",
          "type": "boolean"
        },
        "strip": {
          "default": "both",
          "description": "Which bodies to remove: 'both' (default) request AND response payloads, 'request' only uploaded postData (form fields, JSON payloads), 'response' only downloaded content. Websocket frame data follows the side: sent frames count as request, received as response.",
          "enum": [
            "both",
            "request",
            "response"
          ],
          "type": "string"
        }
      },
      "required": [
        "har"
      ],
      "type": "object"
    }
  }
}