{
  "slug": "http-header-parser",
  "name": "gizza-ai/http-header-parser",
  "version": "0.1.0",
  "title": "HTTP Header Parser — headers to a clean JSON map — gizza.ai",
  "description": "Paste a raw HTTP request or response header block and get a structured, case-normalized JSON map. Fold duplicates, pick the name casing. Free, in your browser.",
  "tags": [
    "http header parser",
    "headers to json",
    "parse http headers",
    "http headers to map",
    "normalize header names",
    "set-cookie parser",
    "response headers",
    "request headers"
  ],
  "category": "network",
  "urls": {
    "page": "https://gizza.ai/tools/http-header-parser/",
    "markdown": "https://gizza.ai/tools/http-header-parser/index.md",
    "descriptor": "https://gizza.ai/tools/http-header-parser/tool.json",
    "deep_link_example": "https://gizza.ai/tools/http-header-parser/?headers=HTTP%2F1.1%20200%20OK%0AContent-Type%3A%20text%2Fhtml%3B%20charset%3Dutf-8%0ACache-Control%3A%20max-age%3D60%0ASet-Cookie%3A%20id%3D1%3B%20Path%3D%2F%0ASet-Cookie%3A%20sess%3Dxyz%3B%20HttpOnly&case=canonical&duplicates=combine"
  },
  "cli": "gizza tool http-header-parser \"HTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nCache-Control: max-age=60\nSet-Cookie: id=1; Path=/\nSet-Cookie: sess=xyz; HttpOnly\"",
  "tool": {
    "description": "Parse a raw HTTP request or response header block into a structured, case-normalized JSON map of name → value. Accepts a bare header block or one led by a request/status line (captured separately). Header names are folded case-insensitively and re-cased via `case`: canonical Title-Case like Content-Type (default), lower, upper, or original. Repeated headers are folded via `duplicates`: combine joins values with ', ' per RFC 7230 while keeping Set-Cookie as a list (default), list keeps every occurrence as an array, or first/last keeps one. Tolerates CRLF or bare-LF endings and obsolete folded continuation lines, stops at the first blank line, and reports the detected kind, header count, line count, and which names were duplicated. Returns JSON. Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "case": {
          "default": "canonical",
          "description": "How to re-case header names in the map (names are always folded case-insensitively): canonical HTTP Title-Case like Content-Type (default), lower, upper, or original (keep the first-seen casing).",
          "enum": [
            "canonical",
            "lower",
            "upper",
            "original"
          ],
          "type": "string"
        },
        "duplicates": {
          "default": "combine",
          "description": "How to fold repeated headers: combine joins values with ', ' per RFC 7230 while keeping Set-Cookie as a list (default); list keeps every occurrence as a JSON array; first or last keeps only that occurrence.",
          "enum": [
            "combine",
            "list",
            "first",
            "last"
          ],
          "type": "string"
        },
        "headers": {
          "description": "The raw HTTP header block to parse — one 'Name: value' per line. A leading request line (GET /p HTTP/1.1) or status line (HTTP/1.1 200 OK) is optional and captured separately. CRLF or bare-LF line endings and obsolete folded continuation lines are accepted; parsing stops at the first blank line.",
          "type": "string"
        }
      },
      "required": [
        "headers"
      ],
      "type": "object"
    }
  }
}