Every login on the web depends on a few lines of text called a cookie. If that cookie is set carelessly, someone can steal it from a script, from public Wi-Fi or from a page on another site, and then be you without ever knowing your password. The mistakes are small: a missing flag, a login cookie that lives for a year, a session ID that is too short. This Cookie Security Analyzer reads the cookies your site sets, tells you in plain words what is wrong with each one, and gives you a safer version to use instead. It is free, runs in your browser and needs no signup.
It can
- Grade every cookie from A+ to F
- Explain each problem in plain words
- Write a safer header for each cookie
- Show which cookies a browser would send
It cannot
- Read cookies from a live site by itself
- See HttpOnly cookies from a script export
- Prove a session ID is truly random
- Test your cookies on your real app
Best for
- Site owners and developers
- Security and SEO audits
- Checking a plugin or a login system
- Learning how cookies work
What this Cookie Security Analyzer does
A cookie is a small piece of text. Your server hands it to the browser with a Set-Cookie header, and the browser sends it back with every later request. That is how a site knows that the request comes from the same logged-in person.
The analyzer checks how each cookie is set. It looks at the flags that decide who can read it and when it is sent (Secure, HttpOnly and SameSite), at the name prefixes, the Domain, the lifetime and the size. It also looks at the value: whether a session ID is long enough to be hard to guess, whether a token is signed, and whether personal data is sitting inside.
What is a secure cookie?
A secure cookie is one that is hard to steal and hard to misuse. It travels only over https, page scripts cannot read it, other websites cannot make the browser send it by trick, and it does not live longer than it must.
How cookies work, and where the flags help
The server sets the cookie once. After that the browser attaches it to every request to that site. The flags are rules the server writes into the header, and the browser has to follow them.
Each flag closes one door. A login cookie needs all three.
How to use it step by step
- Get your cookies. Open your site, press F12, go to the Application tab (Storage in Firefox) and open Cookies. You can also copy the Set-Cookie lines from the Network tab. The Get tab lists every way.
- Paste them in the Analyze tab. Any of the common formats works: header lines, the cookie table, a JSON export or a cookie file.
- Type your site. It is optional. It lets the tool check the Domain and the https rules.
- Press Analyze. You get an overall grade and one card per cookie. The worst cookies come first.
- Open a card. It shows the cookie’s settings, each problem with a reason, and a safer header you can copy.
- Test the send rules. In the Send test tab describe a request and see which cookies the browser would attach.
- Fix, then compare. Change the settings on your server, paste the old and the new headers in the Compare tab, and check that the grade went up.
What the flags and settings mean
| Setting | In plain words |
|---|---|
| Secure | The cookie is only sent over https. Needed for every login cookie. |
| HttpOnly | Scripts on the page cannot read the cookie. Stops theft through injected code. |
| SameSite=Lax | Sent on your site and on normal link clicks from other sites. A good default. |
| SameSite=Strict | Sent only when the request starts on your site. The strongest choice. |
| SameSite=None | Sent in all cross-site requests. Needs Secure. For embeds and widgets. |
| Domain | Shares the cookie with every subdomain. Leave it out to keep it on one host. |
| Max-Age or Expires | How long the cookie lives. Without them it is a session cookie. |
| __Host- prefix | A name rule that forces Secure, Path=/ and no Domain. Browsers reject the cookie otherwise. |
What you can do with it
- Analyze many cookies at once. Each gets a grade, and the whole set gets an overall grade.
- Recognise what a cookie is for. Session, login, CSRF token, analytics, advertising, preference, consent and more, from well-known names. If a name is unfamiliar, tick the box that treats every cookie as sensitive.
- Look inside values. The tool decodes tokens, flags unsigned ones, and warns about personal data, serialized data and short session IDs.
- Get a safer header. A rewritten Set-Cookie line for each cookie, ready to copy, or all of them in one file.
- Test what the browser sends. Pick the request type and see which cookies go along and why the others stay home.
- Build a cookie. Choose what it is for and get safe settings and code for Node.js, PHP, Django, Flask, ASP.NET Core, Spring, Nginx and Apache.
- Compare before and after. See each change and the new grade.
- Export a report. Text, Markdown or JSON, without any cookie values.
SameSite: which requests carry the cookie
SameSite is the setting people get wrong most often. It decides whether the browser attaches your cookie when the request starts on a different website. A forged form on a hostile page is the classic example: it makes your browser post to your bank, and the bank sees a valid cookie.
Lax is a good default for login cookies. None is for cookies that really must work inside another site, and it needs Secure.
Tips for safer cookies
- Set Secure, HttpOnly and SameSite on every login cookie. Say it explicitly, do not rely on browser defaults.
- Leave the Domain out. A cookie without Domain stays on one host, and subdomains cannot read or overwrite it.
- Use the __Host- prefix when you can. It makes the browser enforce the safe settings for you.
- Keep login cookies short-lived. A stolen cookie works until it expires. Renew it while the person is active.
- Store an ID, not data. Keep the real data on the server. Do not put emails, roles or objects in a cookie.
- Sign every token. An unsigned token can be edited by anyone who holds it.
- Let your framework make session IDs. Home-made IDs are often short or patterned.
- Pair SameSite with a CSRF token for actions that change data, and clear the cookie on logout.
What this tool cannot do
- It does not read your live site. A web page cannot see the cookies of another site, so you paste them in. The Get tab shows how.
- Script exports hide HttpOnly cookies. A page script cannot see them, so a cookie string or a script export shows no HttpOnly information. Use the developer-tools table or the response headers for those.
- The type of a cookie is a guess from its name. Well-known names are recognised. For anything else the tool is careful and says Unknown. If your cookie holds a login, tick the sensitive box.
- The session ID check is an estimate. It works from length and characters. It cannot prove that the ID is random, only that it is not obviously weak.
- The send test is a simplified model. It applies the cookie rules, but not your browser’s own privacy settings, third-party cookie blocking, or the short exception Chrome gives to Lax cookies on cross-site posts.
- The safer headers are suggestions. Locking a cookie down can break a login flow, and renaming a cookie logs everyone out. Test on a staging copy first.
- The tracking note is not legal advice. It only points out cookies that usually need consent. Check the rules that apply to you.
- I did not test on a real phone. The page fits a phone-sized screen, but I could not try real touch use.
Your privacy
The cookies you paste are read in your browser. They are not uploaded and not saved. Cookies can hold logins, so do not paste real session cookies of an account you care about into any tool, mine included. Use test accounts, or remove the value part before you paste. The tool only needs the names and the settings. It keeps two settings on your device: your site address and the sensitive-cookie box. The links in the Get tab open other websites in a new tab, and only when you click them.
Why trust this page
I built this tool myself and tested it before writing this page. I ran more than sixty automatic checks. The reader handled five formats: Set-Cookie lines, full response headers, the developer-tools table, a JSON export and a cookie file, and it rejected broken input with a clear message.
For the rules I wrote sample cookies and checked that each one produced the right result. A weak session ID with no flags failed on Secure, HttpOnly and ID strength. A correct __Host- cookie scored A+, and a broken one was flagged. SameSite=None without Secure failed. A Domain from another site failed, and a Domain on a login cookie was flagged as too wide. A token with no signature failed, a token without an expiry was flagged, and a serialized cart and an oversized value were caught. The suggested safer header added the missing flags in each case.
The send test was checked against the rules one by one: Strict blocked cross-site requests, Lax allowed a link click but blocked a form post and an embed, None allowed all of them, a Secure cookie stayed home on plain http, paths and domains were matched correctly, and a cookie being deleted was not sent. The builder fixed prefix conflicts automatically, and the compare tab reported the changed flags and a better grade.
Three limits I want to say clearly. I tested with sample cookies I wrote myself, not with cookies from many real sites, so the type guesses may miss unusual names. My test environment had no web fonts, so I saw fallback fonts. And I did not test on a real phone. I checked a phone-sized layout, which had no sideways scrolling.
Questions people ask
Is this Cookie Security Analyzer free?
Yes. It is free, with no signup and no limits. The cookies you paste are read in your browser and are not uploaded.
How do I check the cookies of my website?
Open your site, press F12, go to the Application tab and open Cookies. Select the rows, copy them and paste them in the Analyze tab. You can also copy the Set-Cookie lines from the Network tab, which shows the settings exactly as the server sent them.
What is the HttpOnly flag?
HttpOnly tells the browser that page scripts must not read the cookie. If an attacker manages to run code on your page, they still cannot steal a login cookie that has HttpOnly. Every session cookie should have it.
What does the Secure flag do?
Secure means the cookie is only sent over https. Without it, the browser also sends the cookie over plain http, where anyone on the same network can read it.
Which SameSite value should I use?
Use Lax for most cookies and Strict for cookies that are never needed when someone arrives from another site. Use None only when a cookie must work inside another website, and then it must also be Secure.
Why does my cookie have SameSite=None but is rejected?
Browsers reject SameSite=None cookies that are not Secure. Add the Secure flag and serve the site over https.
What is the __Host- prefix?
It is a name rule. A cookie named __Host-something is only accepted if it is Secure, has Path=/ and has no Domain. That keeps it on exactly one host and stops subdomains and plain-http pages from overwriting it.
How long should a login cookie live?
As short as your users can live with. A session cookie that ends with the browser is the safest. For a stay-signed-in option many sites use a few weeks, and renew it while the person is active. The tool warns when a login cookie lives for more than 30 days.
Is it safe to store a JWT in a cookie?
It can be, if the cookie is Secure, HttpOnly and SameSite, the token is signed with a strong algorithm and has a short expiry, and it holds no private data. A token is encoded, not encrypted, so anyone who gets it can read what is inside.
Why are there so many cookies I did not set?
Plugins, analytics and advertising tools add their own. The tool marks those as tracking cookies. In many countries they need consent before they are set, so check your cookie banner and your policy.
Can it check a cookie list from a plugin or a framework?
Yes, if you can see the Set-Cookie headers or the cookies in the browser. The tool does not care which software made them, and it does not need to run your code.
Is it safe to paste my cookies here?
The tool does not upload or save them. Still, real session cookies are like passwords. Use a test account, or replace the value part with something fake, because the checks mostly need the names and the settings.
Hi, I’m Waqas, the person behind Brivonto. I started this site because I wanted online tools that simply work, without sign-ups or watermarks. I build each tool myself and keep improving them based on your feedback. Questions or feedback?

