{
  "slug": "cookie-parser",
  "name": "gizza-ai/cookie-parser",
  "version": "0.1.0",
  "title": "Cookie Parser — gizza.ai",
  "description": "Split a Cookie or Set-Cookie header into individual cookies with their attributes — Domain, Path, Expires, Max-Age, Secure, HttpOnly, SameSite. Free, in your browser.",
  "tags": [
    "cookie parser",
    "set-cookie parser",
    "parse cookie header",
    "http cookie decoder",
    "samesite checker",
    "cookie attributes",
    "max-age vs expires",
    "httponly secure flags",
    "cookie size checker"
  ],
  "category": "network",
  "urls": {
    "page": "https://gizza.ai/tools/cookie-parser/",
    "markdown": "https://gizza.ai/tools/cookie-parser/index.md",
    "descriptor": "https://gizza.ai/tools/cookie-parser/tool.json",
    "deep_link_example": "https://gizza.ai/tools/cookie-parser/?cookie=Set-Cookie%3A%20sid%3Dabc123%3B%20Domain%3Dexample.com%3B%20Path%3D%2F%3B%20Expires%3DWed%2C%2021%20Oct%202015%2007%3A28%3A00%20GMT%3B%20Secure%3B%20HttpOnly%3B%20SameSite%3DLax&mode=auto&format=json&decode=true&raw_attributes=true&warnings=true"
  },
  "cli": "gizza tool cookie-parser \"Set-Cookie: sid=abc123; Domain=example.com; Path=/; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Secure; HttpOnly; SameSite=Lax\"",
  "tool": {
    "description": "Split a raw HTTP `Cookie:` or `Set-Cookie:` header into individual cookies with their attributes. Auto-detects the header direction (`mode`): a request `Cookie:` header is a flat `name=value; …` list, while each response `Set-Cookie:` line is one cookie plus attributes — Domain, Path, Expires, Max-Age, Secure, HttpOnly, SameSite, Priority, and Partitioned, with unrecognized attributes preserved. Paste many `Set-Cookie:` lines at once. `Expires` is also normalized to an ISO-8601 UTC timestamp, each cookie's byte size is reported against the common 4096-byte browser limit, and `session`/`host_only` are derived. Values are percent-decoded by default (`decode`) and RFC 6265 double-quoted values are unwrapped. `warnings` (on by default) flags `SameSite=None` without `Secure`, missing `Secure`/`HttpOnly`/`SameSite`, a deleting `Max-Age`, an unparseable date, `__Host-`/`__Secure-` prefix violations, and oversized cookies. Choose `format`: `json` (default), `table`, `csv`, or `markdown`. Deterministic — no clock is read, so no relative countdowns. Runs locally; nothing is uploaded.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "cookie": {
          "description": "The raw cookie header text. A request `Cookie:` header is one line of `name=value` pairs separated by `;` (e.g. `sessionid=abc123; theme=dark`); a response `Set-Cookie:` header is ONE cookie plus its attributes (e.g. `sid=abc; Domain=example.com; Path=/; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Secure; HttpOnly; SameSite=Lax`) — paste several, one per line. A pasted `Cookie:`/`Set-Cookie:` header name is stripped and a \"double-quoted\" value is unwrapped.",
          "type": "string"
        },
        "decode": {
          "default": true,
          "description": "When true (default), percent-decode cookie names and values (`%2F`→`/`, `%20`→space). A `+` is kept literal — cookies are not form-urlencoded. Set false to keep values exactly as sent. Attribute values are never decoded, and `size` always counts the raw, undecoded bytes.",
          "type": "boolean"
        },
        "format": {
          "default": "json",
          "description": "Output format. `json` (default): `{ mode, count, cookies: [{ name, value, size, attributes: {…}, session, host_only }] }`, with `Expires` also normalized to ISO-8601 UTC as `expires_iso`. `table`: an aligned plain-text table. `csv`: a comma-separated table with a header row (values quoted when needed). `markdown`: a pipe table for pasting into docs or an issue.",
          "enum": [
            "json",
            "table",
            "csv",
            "markdown"
          ],
          "type": "string"
        },
        "mode": {
          "default": "auto",
          "description": "Which header direction to parse. `auto` (default) picks `set-cookie` when a line carries a `Set-Cookie:` name or any attribute (Path, Domain, Expires, Max-Age, Secure, HttpOnly, SameSite, Priority, Partitioned), otherwise `cookie`. `cookie`: force the request-header reading — every `;`-separated segment is a name/value pair, attributes included. `set-cookie`: force the response-header reading — one cookie per line, everything after the first `;` is attributes.",
          "enum": [
            "auto",
            "cookie",
            "set-cookie"
          ],
          "type": "string"
        },
        "raw_attributes": {
          "default": false,
          "description": "When true, also echo each cookie verbatim: `raw` (the whole line as written) and, in `set-cookie` mode, `attributes_raw` (each attribute segment as written, before normalization). In `table`/`csv`/`markdown` this adds one extra column. Default false. Unrecognized attributes are always kept under `attributes.other` regardless of this flag.",
          "type": "boolean"
        },
        "warnings": {
          "default": true,
          "description": "When true (default), flag structural problems per cookie: `SameSite=None` without `Secure`, missing `Secure`/`HttpOnly`/`SameSite`, a cookie over 4096 bytes, both `Expires` and `Max-Age`, a `Max-Age` of 0 or less (a delete), an unparseable `Expires`, a leading dot in `Domain`, `Partitioned` without `Secure`, a duplicate name, and `__Host-`/`__Secure-` name-prefix violations. Set false for a clean machine-readable result.",
          "type": "boolean"
        }
      },
      "required": [
        "cookie"
      ],
      "type": "object"
    }
  }
}