Free Cookie Flags Checker for Set-Cookie Headers
Paste Set-Cookie lines to see what Secure, HttpOnly, SameSite, Domain, Path and Partitioned do for each cookie, then test request scenarios. It runs in your browser.
Last updated 15 November 2026
This cookie flags checker reads the Set-Cookie headers you paste and lays out, cookie by cookie, what each attribute tells a browser to do. A matrix shows Secure, HttpOnly, SameSite, Domain, Path, Max-Age or Expires, Partitioned and any __Host- or __Secure- name prefix, each with the rule behind it and the document that rule comes from. Scenario toggles then let you pick a request, such as a cross-site image request over HTTPS or a script reading document.cookie, and the tool says whether the rules it follows would have each cookie sent or exposed, and which attribute decided. Each cookie also gets findings for combinations the sources say a browser rejects, and a suggested Set-Cookie line with every change explained. Used as a cookie security checker, it describes what each attribute does and does not call any cookie safe. Replace real cookie values before you paste; the tool runs in your browser. Cookie values, and the values of attributes the tool does not model, become placeholders. Names, and Domain, Path and Max-Age values, are shown only when they are in a plain form, so paste one Set-Cookie header per line.
How to use this tool
- 1
Replace the values, then paste
Copy the Set-Cookie headers your site sends, one per line, with or without the Set-Cookie: prefix, and replace each real value with a placeholder such as x. Up to 50 lines of 8,000 characters each.
- 2
Check the cookies
Press Check cookies to build the flag matrix. To try the tool first, Load an invented example fills the box with sample lines for example.com.
- 3
Choose a request scenario
Pick HTTPS or HTTP, same site or cross site, what the browser does (a top-level navigation, a subresource or fetch() call, a form POST or a script reading document.cookie), the host that set the cookie or a sibling subdomain, and a request path. The table answers Sent, Not sent or Depends for each cookie (Readable or Hidden for a script read), with the attribute that decided.
- 4
Review findings and copy the suggested lines
Read each cookie's findings, then copy its suggested Set-Cookie line. The value is a placeholder, and every change to the line is listed with the source behind it.
Which document the checker follows, and how it reads a Set-Cookie line
Two IETF documents define how cookies behave, and they do not say quite the same thing. RFC 6265, published in April 2011 on the Standards Track, is the specification for the Cookie and Set-Cookie header fields. The document that would replace it, draft-ietf-httpbis-rfc6265bis, is still an Internet-Draft: in November 2026 the IETF Datatracker showed revision 22, dated 1 December 2025, waiting in the RFC Editor queue with no RFC number. SameSite and the cookie name prefixes exist only in the draft, so the checker takes those rules from it, and it takes Partitioned, and the browser conditions the specifications leave open, from MDN's Set-Cookie reference. Every matrix cell and finding that states a rule names the document it comes from, and so does every scenario answer that an attribute decides. Each line is read the way the draft's parsing algorithm describes. The name and value are the text before the first semicolon, split at the first equals sign. The attributes follow, each split at its own first equals sign, with spaces and tabs trimmed from the ends. Attribute names are not case-sensitive, so httponly and HttpOnly are the same attribute, and RFC 6265 says user agents ignore attributes they do not recognise, but not the entire cookie. When an attribute appears twice, RFC 6265 says servers SHOULD NOT do that, the draft says MUST NOT, and the storage model keeps the last one. The two documents part ways on some malformed lines. RFC 6265 ignores a line with no equals sign before the first semicolon, while the draft reads it as a cookie with an empty name and says servers MUST NOT produce nameless cookies. The draft also ignores a cookie whose name and value together exceed 4,096 octets, and any attribute value longer than 1,024 octets. The checker follows the draft, and for those two kinds of nameless line it also says what RFC 6265 does.
SameSite, and what an unset value means
SameSite decides whether a cookie travels with cross-site requests. MDN's glossary defines a site by its registrable domain, so support.mozilla.org and developer.mozilla.org are the same site, and it notes that the stricter, schemeful definition applied to SameSite cookies treats the http and https versions of an address as different sites. Two subdomains under one registrable domain are therefore the same site, which matters when you read the sibling subdomain scenario. The draft sets out the three values. Strict sends the cookie only with same-site requests. Lax adds cross-site top-level navigations that use a safe method. MDN counts following a link, assigning document.location and submitting a form as top-level navigations, says the safe-method rule excludes POST, PUT and DELETE, and gives fetch() calls, img and script requests and navigations inside an iframe as requests Lax leaves out. None sends the cookie with cross-site requests as well. MDN says Secure must also be set with None, and the draft's storage model ignores a SameSite=None cookie that is not Secure. When SameSite is missing, or holds something other than Strict, Lax or None, the draft applies a Default mode that its retrieval rules treat like Lax. MDN is more guarded: it says some browsers use Lax as the default if SameSite is not specified, and that where Lax is applied as a default, cookies set no more than two minutes before a request are also included in POST requests. The draft names a mode like this Lax-allowing-unsafe and says deployment experience has shown 2 minutes or less to be a reasonable limit. Because the readings differ, the scenario table answers Depends for an unset SameSite on a cross-site subresource, form POST or script read, rather than picking one browser. For a value other than Strict, Lax or None, it follows the draft alone: Lax, or Lax-allowing-unsafe in a browser that uses that mode. The draft adds that Lax gives reasonable defence in depth against cross-site request forgery that relies on unsafe methods, not a robust defence, and strongly encourages the usual server-side defences, such as CSRF tokens.
Secure, HttpOnly, Domain and Path: what each one limits
Secure keeps a cookie to secure channels. RFC 6265 says the user agent includes such a cookie in a request only if the request is transmitted over a secure channel, typically HTTP over TLS, and warns that Secure protects only the cookie's confidentiality, because an active network attacker can overwrite Secure cookies from an insecure channel. MDN adds that an http: page cannot set a Secure cookie, and notes an exception for localhost. HttpOnly limits who can read a cookie, not where it goes. MDN says it forbids JavaScript from accessing the cookie, for example through document.cookie, which mitigates cross-site scripting, yet a cookie with HttpOnly is still sent with requests that JavaScript starts, such as fetch(). RFC 6265 notes that the two attributes are independent, so a cookie can carry both. Domain widens a cookie's reach. MDN says that leaving it out makes the cookie host-only, returned only to the host that sent it, and that setting it makes the cookie available to that domain and all its subdomains. RFC 6265 and the draft warn that some existing user agents treat an absent Domain as if it named the current host, and so also send the cookie to that host's subdomains. The value has to be the responding server's own domain or a parent of it, and it cannot be a public suffix: a response from api.example.com can set Domain=example.com but not Domain=other.example.com. A leading dot is ignored. Path narrows which requests carry the cookie by URL path, with the slash read as a directory separator. In MDN's example, Path=/docs matches /docs/Web/ but not /docsets. Without a Path attribute, RFC 6265 uses the directory of the address that set the cookie. It also says Path cannot be relied upon for security, and MDN says Path does not protect against reading the cookie from a different path. In the scenario table, Domain decides the sibling subdomain case, Path decides the request path you type, Secure decides the HTTP case and HttpOnly decides the document.cookie case.
Prefixes, Partitioned and lifetime: rules applied when a cookie is stored
Some rules decide whether a browser stores a cookie at all, before any request is made. The draft defines two name prefixes so that a server can have confidence about how a cookie was set. A name starting __Secure- has to come with Secure. A name starting __Host- has to come with Secure, a Path of / and no Domain, which the draft says locks the cookie to one host and makes it effective for the whole host; ports are the only piece of the origin model such cookies still ignore. A browser following the draft ignores a prefixed cookie that breaks its rule, and it matches the prefix case-insensitively, while the server-side definition is a case-sensitive match. MDN warns that a browser without prefix support always accepts prefixed cookies, so the assurance holds only where prefixes are supported. MDN also describes __Http- and __Host-Http- prefixes. The checker applies the __Host- rules to a __Host-Http- name, because it starts with __Host-, but it does not check the HttpOnly requirement MDN gives for those two. Partitioned opts a cookie into partitioned storage, which MDN describes as a separate cookie jar per top-level site. A partitioned cookie is double-keyed, by the origin that sets it and the origin of the top-level page, so it can only be read within the context of the top-level site it was set on. MDN says partitioned cookies must be set with Secure, recommends the __Host prefix if you do not need to share cookies between subdomains, and, in November 2026, marked the feature Baseline 2025, newly available, saying it might not work in older devices or browsers. On lifetime, Max-Age takes precedence over Expires, and a cookie with neither is kept until the session is over, as the browser defines it. MDN says a zero or negative Max-Age expires the cookie immediately. The draft says a browser must limit a cookie's lifetime, that the limit should not be more than 400 days, and that a longer Expires or Max-Age must be reduced to the limit.
What the checker does with your paste, and what it cannot tell you
This cookie header analyser runs in the page. Nothing you paste or type is sent to a server or put in analytics: each completed check sends one analytics event that names the tool and the page. Cookie values, and the values of attributes the tool does not model, are dropped as each line is read. For a cookie's value the parser keeps only whether it is empty, its length in octets and whether it starts with a prefix, and it notes whether the line holds a control character, because the draft's rules need those facts. A suggested line shows a placeholder for the cookie's value, each value of an attribute the tool does not model, and a cookie name, Domain or Path not in plain form. It leaves out an attribute a browser ignores, an unmodelled attribute whose name is not shown, a Path that does not start with / and the earlier copies of a repeated attribute, and turns an unrecognised SameSite value into Lax. Replace real values before you paste anyway: the box holds them until you clear it or leave the page. A paste can hold up to 50 lines of up to 8,000 characters each, and anything longer is refused rather than cut. A line starting Cookie:, or one pasted without Set-Cookie: that holds several name=value pairs and none of the attributes the tool models, looks like a request header, so it is skipped and named, and so is a line that looks like several Set-Cookie headers joined with commas. Typed sibling hosts are capped at 253 characters and request paths at 2,048. Some things the checker cannot tell you. It does not know which host sent the headers, so it cannot confirm that a Domain value covers that host, and it does not hold the public suffix list. It cannot see a browser's third-party cookie policy or a visitor's settings. It models the cited documents, not one browser. It does not check MDN's __Http- prefix rule. And it says nothing about how your server handles sessions, such as whether one ends at sign-out.
Sources
- Internet Engineering Task Force (IETF), RFC Editor: RFC 6265: HTTP State Management Mechanism
- Internet Engineering Task Force (IETF): draft-ietf-httpbis-rfc6265bis-22: Cookies: HTTP State Management Mechanism (Internet-Draft)
- Internet Engineering Task Force (IETF) Datatracker: draft-ietf-httpbis-rfc6265bis: document status on the IETF Datatracker
- MDN Web Docs: Set-Cookie header
- MDN Web Docs: Cookies Having Independent Partitioned State (CHIPS)
- MDN Web Docs: Site (glossary)
- IETF (RFC Editor): RFC 5890: Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework
- IETF (RFC Editor): RFC 2616: Hypertext Transfer Protocol, HTTP/1.1
Worked example
An invented example, not taken from any site: a developer checks the cookie a chat widget sets, using one of the lines from the tool's own invented example, in a cross-site scenario.
- Pasted line
- chat_widget=x; Domain=.example.com; Path=/; SameSite=None
- Connection
- HTTPS
- Where the request starts
- Cross site
- What the browser does
- Subresource or fetch()
Not sent, decided by SameSite=None without Secure: the draft ignores a SameSite=None cookie that is not Secure, so a browser following it does not store this cookie.
The suggested line adds Secure and HttpOnly, the second to take out if the widget's own script reads the cookie, and drops the leading dot from Domain. With Secure added, the same scenario answers Sent, decided by SameSite=None, with a note that a browser's third-party cookie policy can still withhold it.
Who uses this tool
Developers reviewing a sign-in flow
Paste the cookies a login response sets and confirm the session cookie carries Secure, HttpOnly and a SameSite value someone chose, before the release ships.
Teams embedding a widget on other sites
See whether the widget's cookie travels with cross-site subresource requests, and what SameSite=None, Secure and Partitioned each change.
Apps split across subdomains
Check which cookies reach api.example.com from www.example.com, and whether a Domain attribute is set wider than the app needs.
Reviewers working through audit notes
Turn a list of Set-Cookie headers from a report into a per-cookie matrix with sourced explanations and suggested lines.
Frequently asked questions
Does this cookie flags checker send my cookies anywhere?
No. It runs in your browser, and nothing you paste or type reaches a server. Cookie values, and the values of attributes the tool does not model, become placeholders. Names, and Domain, Path and Max-Age values, are shown only when they are in a plain form, so paste one Set-Cookie header per line. Each completed check sends one analytics event naming the tool and the page, and nothing you pasted or typed. Replace real values anyway: the box keeps them until you clear it or leave the page.
What does a browser do with a cookie that has no SameSite attribute?
It depends on the browser. The draft that would replace RFC 6265 gives such a cookie a Default mode that its retrieval rules treat like Lax. MDN says some browsers use Lax as the default if SameSite is not specified, and that a Lax default also includes cookies set within the last two minutes in POST requests. The scenario table answers Depends where those readings differ, so set SameSite explicitly.
Why is my SameSite=None cookie not being stored?
One cause the checker reports is a missing Secure attribute. The draft's storage model ignores a SameSite=None cookie unless it is Secure, and MDN says Secure must also be set with None. MDN adds that an http: page cannot set a Secure cookie, except on localhost, so the site has to be served over HTTPS. A browser's own third-party cookie policy can also withhold the cookie, which this tool cannot see.
Does HttpOnly stop a cookie being sent with fetch()?
No. MDN says HttpOnly forbids JavaScript from accessing the cookie, for example through document.cookie, but a cookie created with HttpOnly is still sent with requests JavaScript starts, such as XMLHttpRequest.send() or fetch(). HttpOnly limits reading, not sending. Secure, Domain, Path and SameSite decide which requests carry the cookie, and the scenario table shows each of them at work.
Should I set the Domain attribute on a session cookie?
Set it only if other hosts need the cookie. MDN says that leaving Domain out makes a cookie host-only, returned only to the host that sent it, and that setting it makes the cookie available to that domain and all its subdomains. The draft's __Host- prefix requires no Domain at all. Choose the sibling subdomain scenario to see which of your cookies another host would receive.
What do the __Host- and __Secure- prefixes check?
The draft says a browser ignores a cookie named with __Secure- unless it has Secure, and one named with __Host- unless it has Secure, a Path of / and no Domain. Browsers following the draft match the prefixes case-insensitively. MDN warns that browsers without prefix support always accept prefixed cookies, so treat a prefix as an extra assurance where it is supported, alongside the attributes themselves.