Shiklo Tools
PDF40
Image20
Calculators & Converters25
Text & Writing13
Developer26
Video14
Audio14
Document14
Data & Spreadsheet12
Web & SEO9
OCR & Scanning5
Archive & File12
Security & Privacy23
Health & Medical29
QR & Barcode5

Cookie Analyzer

Analyse Set-Cookie headers: Secure, HttpOnly, SameSite, expiry, domain, prefixes and size, with problems browsers reject and a fixed header.

Paste the Set-Cookie headers from a response, one per line as you copy them from the browser's developer tools or from curl -I, and the analyzer explains each cookie: when it expires, which sites and paths it is sent to, and what Secure, HttpOnly, SameSite and Partitioned mean for it. It flags problems that make browsers reject a cookie, such as SameSite=None without Secure or a broken __Host- prefix, and security warnings such as a session cookie readable by scripts, then suggests a corrected header to copy.

Values are decoded where possible: URL-encoded text, base64 JSON and JSON Web Tokens with their expiry. You can also paste a request Cookie header to list its cookies. Nothing is sent anywhere.

How to use Cookie Analyzer

  1. Copy the Set-Cookie headers from the Network tab in developer tools, or from curl -I.
  2. Paste them, one per line; other headers are ignored.
  3. Read each cookie's settings, problems and warnings.
  4. Copy the suggested header and update your server or framework settings.

Features

  • Parses any number of Set-Cookie headers
  • Checks SameSite, Secure, HttpOnly, Domain, Path and expiry
  • __Host- and __Secure- prefix rules
  • 400-day cap and 4 KB size limit
  • Decodes URL-encoded, base64 JSON and JWT values
  • Suggests a corrected Set-Cookie header

Cookie attributes in short

Each attribute controls where and how long a cookie is used.

AttributeWhat it does
Expires / Max-AgeWhen the cookie is deleted; without them it is a session cookie
DomainShares the cookie with subdomains; leave it out to keep it on one host
PathOnly sends the cookie for addresses under this path
SecureOnly sent over https
HttpOnlyHidden from JavaScript, which protects it from XSS attacks
SameSite=Strict / Lax / NoneWhether it is sent on requests from other sites
PartitionedA separate copy per top-level site for embedded content (CHIPS)

SameSite and third-party cookies

SameSite protects against cross-site request forgery. Strict never sends the cookie from another site, which can log users out when they follow a link to you; Lax sends it when the user navigates to your site but not on embedded requests and form posts from other sites, which is the right default for most session cookies; None sends it everywhere and must be combined with Secure. Chrome and Edge treat cookies without SameSite as Lax. Browsers increasingly restrict third-party cookies, so embedded widgets should use Partitioned cookies or other storage.

Cookie prefixes

Names that start with __Secure- or __Host- are a promise the browser enforces. A __Secure- cookie must have Secure. A __Host- cookie must also have Path=/ and no Domain, so it is locked to one exact host and cannot be overwritten by a subdomain or an insecure page. They are a cheap way to harden session and CSRF cookies.

Limits browsers enforce

A cookie's name and value together may be at most 4,096 bytes, and attribute values at most 1,024 bytes. Expiry dates more than 400 days away are shortened to 400 days. Browsers also limit the number of cookies per domain, typically around 180, and servers often reject requests whose Cookie header is too large, returning errors such as 400 or 431. Keep cookies small and store large data on the server.

Cookies and privacy rules

Session and security cookies that a site needs to work are usually allowed without consent, but analytics, advertising and tracking cookies often need the visitor's consent under laws such as the GDPR and the ePrivacy rules in Europe and India's DPDP Act. Listing the cookies your site sets, with their purpose and lifetime, is the first step towards an accurate cookie notice.

Frequently asked questions

Why is my SameSite=None cookie being rejected?

Browsers only accept SameSite=None together with Secure, so the cookie must be set over https with the Secure attribute.

Should session cookies be HttpOnly?

Yes. HttpOnly stops page scripts, including injected ones, from reading the cookie.

What is the difference between Expires and Max-Age?

Expires is a date, Max-Age a number of seconds. If both are set, Max-Age wins. Without either, the cookie is deleted when the browser closes.

What are __Host- cookies?

Cookies whose name starts with __Host- must be Secure, have Path=/ and no Domain. The browser enforces this, locking them to one host.

How do I see my site's Set-Cookie headers?

Open the developer tools (F12), go to Network, reload, click the page request and look at the response headers, or run curl -I followed by the address.

Are my cookies sent anywhere?

No. The headers are analysed in your browser.

Related tools