Language
English

Cookie Formatter

Cookie string parsing and formatting

Input
Paste Cookie text (Cookie Header or Set-Cookie format) here...
Output
Formatted result will appear here...

togotools.top technical reference

Parse Cookie strings locally in your browser. Supports both Set-Cookie multi-line format and Cookie Header single-line format. Extracts names, values, and attributes into JSON with duplicate detection.

Core features

  • Auto-detects Set-Cookie format (multi-line) and Cookie Header format (single-line semicolon-separated).
  • Extracts Cookie name, value, Domain, Path, Expires, Max-Age, Secure, HttpOnly, SameSite attributes.
  • Outputs structured JSON with configurable indent width and duplicate separator.
  • Live statistics: cookie count, unique names, attribute count.

Example: before and after

Boolean attributes (Secure, HttpOnly) are parsed as true. Duplicate Cookie names are listed separately and flagged.

http
Set-Cookie: session=abc123; Path=/; HttpOnly; SameSite=Strict
Set-Cookie: token=xyz; Domain=example.com; Secure

[
  {
    "name": "session",
    "value": "abc123",
    "Path": "/",
    "HttpOnly": true,
    "SameSite": "Strict"
  }
]

Limits

  • Does not auto-decode Base64 or URL-encoded Cookie values; values are preserved as-is.
  • Expires date format is not validated; output as a raw string.
  • Single-line Cookie Header format contains no attributes; only names and values are parsed.

Frequently asked questions

What is the difference between Cookie Header and Set-Cookie format?

Cookie Header is the client-side single-line format (name=value; name2=value2) without attributes. Set-Cookie is the server-side multi-line format where each line contains full Cookie attributes.

What happens with duplicate Cookie names?

All cookies with the same name are parsed and listed separately. The statistics area shows the duplicate name count.