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

Set-Cookie Header Generator

dev

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

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

Fill in the name, value and lifetime and tick the protections; the Set-Cookie line is written as you go and checked the way a browser checks it. A __Host- name must have Secure and Path=/ and no Domain, SameSite=None needs Secure, and anything longer than 400 days is cut to 400 days, so the line you copy is one browsers will keep.

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 use Set-Cookie Header Generator

1

Paste or type your input.

2

Choose the options you need.

3

Press Ctrl+Enter, then copy or download.

How Set-Cookie Header Generator works

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.

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.

The rest of the article, and all 6 questions about Set-Cookie Header Analyzer, are on the Set-Cookie Header Analyzer page.

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.

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.

More ways to use Set-Cookie Header Analyzer

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

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)