Skip to content

Menu

Cookie Parser

Parse and analyze HTTP cookies

Runs entirely in your browserAPI & HTTPFree, no sign-up
Loading tool

01What is Cookie Parser?

Cookie headers look simple until you have to explain why a browser ignored one. This parser reads a cookie string, splits it into parts, and tells you how a browser would treat it. Cookies travel in two shapes, and the tool decides which one you pasted. If a semicolon is followed by an attribute such as Path, Domain, Expires, Max-Age, HttpOnly, Secure, SameSite or Partitioned, the input is read as one Set-Cookie header. The first pair is the name and value, and each attribute is pulled out. Anything else is treated as a Cookie request header and split on semicolons into separate name=value pairs. For Set-Cookie input, the lifetime rules follow RFC 6265 and the RFC 6265bis draft. Max-Age wins over Expires when both are valid. Max-Age=0 or a negative value deletes the cookie. A Max-Age with anything other than digits and an optional minus sign is ignored. An Expires date the browser can't parse is ignored too. With no valid expiry, you have a session cookie. Lifetimes over 400 days get a note, because 6265bis caps them there and Chrome applies that cap. A leading dot in Domain is noted as ignored. Then come the checks. You'll see warnings for a missing HttpOnly, a missing Secure, SameSite=None without Secure, Partitioned without Secure, and a name plus value over 4096 bytes. When SameSite is absent the tool says so instead of guessing. Chrome and the draft treat that like Lax, but not every browser does. Prefixed names are checked as well. A __Secure- cookie needs Secure, and a __Host- cookie also needs Path=/ and no Domain. The newer __Http- and __Host-Http- prefixes must be HttpOnly too. Here's a quick example. Paste _ga=GA1.2.1; Domain=.example.com; Path=/; Max-Age=41472000; Secure; SameSite=Lax. You get the type tracking, a note about the dot, Expires 480 day(s) after it is set, the 400-day cap note, and one issue for the missing HttpOnly. A few limits to keep in mind. The type label (session, tracking, preference, persistent, unknown) is a guess from name patterns such as sid or _ga, nothing more. A Cookie request header carries no attributes, so it can't be checked for security flags. Paste one Set-Cookie line at a time, since several lines are read as one cookie. Everything runs in your browser.

Web developers and security testers who need to see how a browser will read a specific Set-Cookie or Cookie header before they ship or report it. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Cookie Parser

  1. Paste a Set-Cookie value or a Cookie request header into the Cookie String (Set-Cookie or Cookie header) box, or load one of the examples.
  2. Click Parse.
  3. Read each cookie card: value, attributes, the HttpOnly, Secure and SameSite badges, the type label, the lifetime notes and any issues.
  4. Click JSON to copy the parsed result, or use the reset icon to start again.

03Worked examples

Input: id=42; Max-Age=86400
Result: Type: persistent Note: Expires 1 day(s) after it is set Issues: Missing HttpOnly flag; Missing Secure flag; SameSite not set
Issue text shortened. The SameSite issue also explains that Chrome treats a missing value like Lax.
Input: sid=abc; Path=/; Secure; HttpOnly; SameSite=Lax; Max-Age=0
Result: Type: session Note: Max-Age=0 expires the cookie immediately (this is how a server deletes a cookie) Issues: none
The type comes from the name sid, not from the lifetime.
Input: pref=dark; SameSite=None; Max-Age=31536000
Result: Type: preference Note: Expires 365 day(s) after it is set Issues: Missing HttpOnly flag; Missing Secure flag; SameSite=None without Secure is rejected by current browsers
Issue text shortened for the first two.
Input: __Host-token=x; Domain=example.com; Path=/app; Secure; SameSite=Strict
Result: Type: unknown Note: No valid Max-Age or Expires, so this is a session cookie Issues: Missing HttpOnly flag; __Host- cookies must not have a Domain attribute, so browsers will reject this one; __Host- cookies must have Path=/, so browsers will reject this one
Secure alone doesn't satisfy the __Host- prefix.
Input: cart=3; Max-Age=1.5; Secure; HttpOnly; SameSite=lax
Result: Note: No valid Max-Age or Expires, so this is a session cookie Issue: Max-Age=1.5 is not a whole number, so browsers ignore it
Lowercase lax is accepted. Only the bad Max-Age is flagged.
Input: _gid=GA1.2.3; theme=light; tz=UTC; foo=bar
Result: _gid (tracking), theme (preference), tz (preference), foo (unknown) Each: Cannot analyze security flags from Cookie header (only available in Set-Cookie)
No attributes, so this is read as a request Cookie header with four pairs.

04Common use cases

  • Auditing the Set-Cookie header your login endpoint returns before a security review or pen test
  • Breaking a long Cookie header copied from DevTools, a HAR file or curl -v output into readable name=value pairs
  • Working out why a logout response that sends Max-Age=0 does or doesn't clear the session cookie
  • Explaining to a teammate why Chrome drops a SameSite=None cookie that lacks Secure
  • Checking a __Host- CSRF cookie before shipping, since one wrong Path or a Domain attribute makes browsers reject it
  • Spotting analytics cookies whose Max-Age asks for more than the 400 days browsers will keep

05Tips

  • Leave out the Set-Cookie: prefix. The parser expects the header value, and the prefix would end up in the cookie name.
  • Expires is compared to your clock right now, so a past date shows as deleted. Max-Age is counted from when the browser receives the header.
  • To delete a cookie cleanly, send the same name, Path and Domain with Max-Age=0. A different Path creates a second cookie instead of removing the first.
  • SameSite values are case-insensitive, so lax works. A value like Relaxed is flagged, and browsers treat it as if SameSite were not set.
  • Treat the type label as a hint. A cookie named sid with Max-Age=0 still shows as session because the label comes from the name.

06Related concepts

Set-Cookie, SameSite, HttpOnly, Cookie prefixes, CHIPS (Partitioned cookies), RFC 6265bis.

Frequently Asked Questions

What is Cookie Parser?

Cookie Parser is a free, browser-based developer tool on AIDToolStack. Parse and analyze HTTP cookies It requires no installation or sign-up and works entirely in your browser.

Is Cookie Parser free to use?

Yes. No sign-up, no fees and no usage cap.

Does Cookie Parser store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe