Works on this device. File exports run online.
Cookie Security Checker
Paste the Set-Cookie lines your server sends, or type a site address below to read them from the live site. Each cookie gets a list of problems and notes, and a safer line to use instead.
Check Set-Cookie lines
One line per cookie; "Set-Cookie:" in front is optional. A cookies.txt file or a JSON export also works.
Make a safe Set-Cookie line
How to check
- Copy the Set-Cookie lines from your browser’s developer tools (Network tab, the answer headers) or from your server code.
- Paste them, one per line, and type your site’s address.
- Fix the problems first, then the warnings; the notes explain choices that can be intended.
What is checked
- Secure: without it, the cookie is also sent over plain http:// and can be read on the network. A Secure cookie set from a plain http:// page is ignored.
- HttpOnly: without it, page scripts can read the cookie, so an injected script (XSS) could steal a login cookie. CSRF tokens are an intended exception.
- SameSite: Lax or Strict keep the cookie out of most requests from other sites. SameSite=None needs Secure, or browsers reject the cookie.
- __Host- and __Secure- prefixes: browsers reject a __Host- cookie without Secure, Path=/ and no Domain, and a __Secure- cookie without Secure.
- Domain, lifetime and size: Domain shares the cookie with every subdomain; browsers cap lifetimes at 400 days and drop cookies over 4096 bytes; Partitioned needs Secure.
Limits
The live check sees only the cookies the server sets in its answers, not cookies that scripts set in the browser (analytics or consent tools). The rules are those of current browsers (RFC 6265bis); older browsers may accept some cookies that are marked as rejected here.