{
  "slug": "cookie-string-to-json",
  "name": "gizza-ai/cookie-string-to-json",
  "version": "0.1.0",
  "title": "Cookie String to JSON — gizza.ai",
  "description": "Parse a raw HTTP Cookie header string into JSON — name/value object or an array of {name, value} pairs, with optional URL-decoding. Free, in your browser.",
  "tags": [
    "cookie string to json",
    "parse cookie header",
    "cookie parser",
    "cookie to json",
    "http cookie decode",
    "document.cookie parser",
    "name value pairs",
    "url decode cookie",
    "puppeteer cookies"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/cookie-string-to-json/",
    "markdown": "https://gizza.ai/tools/cookie-string-to-json/index.md",
    "descriptor": "https://gizza.ai/tools/cookie-string-to-json/tool.json",
    "deep_link_example": "https://gizza.ai/tools/cookie-string-to-json/?cookie=sessionid%3Dabc123%3B%20theme%3Ddark%3B%20path%3D%252Fhome&decode=true&output=object"
  },
  "cli": "gizza tool cookie-string-to-json \"sessionid=abc123; theme=dark; path=%2Fhome\"",
  "tool": {
    "description": "Parse a raw HTTP request `Cookie:` header string (`name1=value1; name2=value2; …`) into JSON. Splits on `;` (and newlines), trims whitespace, strips a pasted `Cookie:`/`Set-Cookie:` header name, unwraps RFC 6265 double-quoted values, and by default percent-decodes names and values (a `+` stays literal — cookies are not form-urlencoded). Choose the output shape with `output`: `object` (default) returns a `{name: value}` JSON object in source order where a repeated name collapses into an array; `pairs` returns an ordered `[{name, value}]` array (the browser-automation shape) keeping every duplicate. Set `decode` false to keep values raw. This parses the request Cookie header's name/value list only — `Set-Cookie` attributes (expires, path, domain, Secure, HttpOnly) are not extracted. Runs locally; nothing is uploaded.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "cookie": {
          "description": "The raw HTTP request `Cookie:` header string, e.g. `sessionid=abc123; theme=dark; path=%2Fhome`. Cookies are separated by `;` (newlines also work). A pasted `Cookie:`/`Set-Cookie:` header name and surrounding whitespace are stripped; a value wrapped in \"double quotes\" is unwrapped.",
          "type": "string"
        },
        "decode": {
          "default": true,
          "description": "When true (default), percent-decode names and values (`%2F`→`/`, `%20`→space). A `+` is kept literal (cookies are not form-urlencoded). Set false to return raw, still-encoded values.",
          "type": "boolean"
        },
        "output": {
          "default": "object",
          "description": "Output shape. `object` (default): a `{ \"name\": \"value\" }` JSON object in source order, where a repeated cookie name collapses into an array of its values. `pairs`: an ordered array of `{ \"name\", \"value\" }` objects, the shape Selenium/Puppeteer/Playwright use, keeping every duplicate separately.",
          "enum": [
            "object",
            "pairs"
          ],
          "type": "string"
        }
      },
      "required": [
        "cookie"
      ],
      "type": "object"
    }
  }
}