Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsSet-Cookie Header Analyzer

Set-Cookie Header Analyzer

dev

See what a browser keeps from each Set-Cookie line, what it rejects and how to harden it

Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 17 Oct 2026.

A Set-Cookie header asks the browser to store one cookie with attributes such as Secure, HttpOnly, SameSite, Path and Max-Age. This analyzer reads each header as a browser does, shows what is kept and ignored, explains a rejection such as SameSite=None without Secure, and caps lifetimes at 400 days as browsers do.

Next:
  • Security Headers Generator Choose HSTS, CSP, framing and more, then copy the nginx, Apache or Vercel config
  • HTTP Headers Checker See the status, response headers and redirect chain of any URL, with security checks

How to check a Set-Cookie header

1

Paste one or more Set-Cookie lines from the response headers.

2

Enter the page address the response came from; https://www.example.com/ is assumed.

3

Read each cookie as the browser stores it, or the reason the browser drops it.

4

Fix the flagged attributes, or switch to Build to write a hardened Set-Cookie line.

About Set-Cookie Header Analyzer

Cookies fail quietly. A browser that refuses a cookie shows no error to the visitor, and the login simply does not stick. Paste the Set-Cookie lines from the response, with the address of the page, and each cookie is read by the same algorithm browsers use.

What you see for each cookie. The name and value; the attributes the browser keeps, with the last one winning when an attribute repeats; the ones it ignores, such as a misspelt Expires date or an unknown attribute; the expiry it will actually store; whether it is sent to subdomains; and the Cookie header the page would send back.

Why a browser rejects a cookie.

Cause Rule
SameSite=None without Secure Current browsers drop it
__Secure- name without Secure Prefix rule
__Host- name with Domain, without Secure, or a Path other than / Prefix rule
Secure set over plain http Not stored
Domain of another site, or a bare suffix such as com Domain rule
Name and value over 4,096 bytes Size limit

Hardening advice. Accepted cookies are checked too: Secure everywhere, HttpOnly for session cookies so scripts cannot read them, an explicit SameSite, a lifetime that matches the job, no Domain unless subdomains need it, and the __Host- prefix for session cookies, which locks a cookie to one origin. Lifetimes over 400 days are cut to 400 days by current browsers, and the page shows the date they will really expire.

Build mode. Fill in a form and copy a Set-Cookie line that passes every check above.

The parsing follows RFC 6265 and the current cookie draft, and it passes all 218 enabled cases of the http-state test suite written for browsers. Only one-label domains are treated as public suffixes; the full list is not bundled. Nothing you paste leaves the browser.

Frequently asked questions

Why is my cookie not being set?

Common causes are SameSite=None without Secure, a Secure cookie sent over plain http, a Domain attribute naming another site, a __Host- or __Secure- name without the attributes its prefix requires, or a cookie over 4,096 bytes. Paste the Set-Cookie line and the page address to see which rule the browser applied.

What does SameSite=None require?

Current browsers accept SameSite=None only together with the Secure attribute, so the cookie must be set and sent over HTTPS. Without Secure the whole cookie is dropped. SameSite=None lets the cookie travel with cross-site requests, so use it only for cookies that embedded content or third-party flows really need.

What is the __Host- cookie prefix?

A cookie whose name starts with __Host- is accepted only with Secure, Path=/ and no Domain attribute. The browser then guarantees it was set by this exact host over HTTPS and is sent only to it, so a subdomain or an http page cannot overwrite it. Session cookies benefit most.

How long can a cookie last?

Current browsers cap a cookie's lifetime at 400 days, about 13 months, whatever Expires or Max-Age asks for, following the current cookie standard draft. A cookie with neither attribute is a session cookie and is removed when the browser session ends, although restoring tabs can keep it longer.

What is the difference between Expires and Max-Age?

Expires gives an absolute date, such as Wed, 21 Oct 2026 07:28:00 GMT; Max-Age gives a number of seconds from now. When both are present, Max-Age wins. Max-Age=0 or a past Expires date deletes the cookie, which is how servers log a user out.

Should every cookie have HttpOnly?

Every cookie that scripts do not need should have it, and session or authentication cookies always should: HttpOnly hides the cookie from JavaScript, so an injected script cannot steal the session. Cookies that the page's own code reads, such as a theme or consent setting, have to leave it off.

Sources

  • RFC 6265, HTTP State Management Mechanism, §5Cookie-date parsing, the Set-Cookie algorithm, storage model and Cookie header
  • draft-ietf-httpbis-rfc6265bis-22 (Cookies)SameSite, __Secure- and __Host- prefixes, 4096/1024-octet limits, 400-day cap
  • http-state cookie test suite (IETF httpstate WG)222 browser test cases used as fixtures

Last verified 17 October 2026.

Rates and rules change; check the source before you rely on a figure.

Still stuck? Ask about Set-Cookie Header Analyzer and anybody who knows can answer. No account needed.

Common uses

  • Set-Cookie Header GeneratorBuild a Set-Cookie line with Secure, HttpOnly, SameSite and __Host-, checked as you go

On the related tools: JWT Decoder – Paste a token to read its header, payload and expiry · Passphrase Generator – Three to ten random words you can actually remember · Bcrypt Generator – Generate a bcrypt hash for a test user or a config file.

Related tools

All developer tools
JWT Decoder, Verifier & EncoderDecode any JWT, verify its signature, and sign new tokens, all in your browserPassword GeneratorStrong random passwords and memorable passphrases, generated on your devicePassword Strength CheckerHow long your password would survive an attack, and exactly what makes it weakHMAC GeneratorHMAC-SHA1, SHA-256, SHA-384 and SHA-512 of text or a file, and signature checksBcrypt Hash and VerifyHash a password with bcrypt at cost 4 to 14, or check a password against a hashTOTP Generator and TesterLive authenticator codes from a secret, a QR code for your app, and a code testerCertificate DecoderRead an SSL certificate, CSR or public key: names, dates, key size and fingerprintsIMEI CheckerCheck an IMEI number’s check digit, see its TAC and serial, and look up the phone model
Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)