Cookie Inspector
Paste a cookie list - Set-Cookie response headers, the output of
document.cookie, a Netscape cookies.txt export or a whole HAR file -
and the inspector explains every attribute in plain English: what Secure,
HttpOnly and SameSite actually do, when the cookie expires, which
hosts and paths it is sent to, and how big it is. It then runs a security audit that flags
the mistakes that matter - an auth cookie without Secure, a session token
readable by JavaScript, SameSite=None without Secure - and scores
the whole set from 0 to 100. Copy or download the report as text, JSON or CSV.
Paste your cookies
The format is detected automatically: Set-Cookie headers, document.cookie output, Netscape cookies.txt or HAR JSON.
Cookie attribute reference
The full set of attributes a cookie can carry, with what each one does and what it means when it is missing or wrong.
| Attribute | What it does | If missing or wrong |
|---|---|---|
Secure | The cookie is only ever sent over HTTPS. A plain-HTTP request to the same host will not include it, which stops it being read off an unencrypted connection. | Missing on a session or auth cookie: the token can be captured by anyone who sees the traffic (public Wi-Fi, a transparent proxy, DNS rebinding). |
HttpOnly | JavaScript cannot read the cookie - it is absent from document.cookie and not exposed to fetch/XHR code. The browser still sends it with requests. | Missing on a session token: any XSS flaw becomes full account takeover, because a script can read and exfiltrate the cookie. |
SameSite=Strict | The cookie is never sent on cross-site requests - no form posts, no fetches, no redirects from another origin. Strongest CSRF protection. | Overkill for most login flows: the user cannot click a link from an email or another site and arrive still logged in. |
SameSite=Lax | The default in modern browsers. The cookie is sent on top-level navigations (clicking a link) but not on cross-site sub-requests (fetch, XHR, form POST from another origin). | Good baseline for session cookies. If your cross-site API calls suddenly stop carrying the cookie after an upgrade, this is usually why. |
SameSite=None | The cookie is sent on every request, including cross-site ones. Required for legitimate third-party and cross-site API use. | Must be combined with Secure - browsers reject SameSite=None cookies that are not also Secure, so the cookie silently never gets set. |
Expires= | A fixed HTTP date (e.g. Wed, 21 Oct 2025 07:28:00 GMT). The cookie is persistent: it survives browser restarts until that moment. | A past date means the browser deletes the cookie on the next write. Setting epoch (Thu, 01 Jan 1970 00:00:00 GMT) is the standard way to delete a cookie. |
Max-Age= | Lifetime in seconds from now. When both Max-Age and Expires are present, Max-Age wins (RFC 6265). | Setting both to different values is a classic bug: the browser obeys Max-Age and your Expires-based cleanup logic gets it wrong. |
| (no expiry) | A cookie with neither Expires nor Max-Age is a session cookie: it lives until the browser process exits. | Fine for UI state; risky for auth - a "remember me" that silently degrades to a session cookie after a flag typo logs users out on restart. |
Domain= | Which hosts the cookie is sent to. Domain=.example.com covers example.com and every subdomain; omitting it scopes the cookie to the exact host that set it. | A leading dot is legacy (RFC 6265 treats both forms identically). Setting a domain broader than your site leaks the cookie to subdomains you may not control. |
Path= | Which URL paths on the host the cookie is sent to. Path=/cart means only URLs starting with /cart. | Omitting Path defaults to the path of the request that set the cookie, not the site root - a common surprise when a cookie "disappears" on other pages. |
| Size | The byte length of name=value. Browsers cap the cookie jar at roughly 4 KB per cookie and ~180 cookies per domain (limits vary by browser). | Oversized analytics or "bag" cookies get truncated or dropped, and every response header carrying them slows the whole site down. |
#HttpOnly_ | In Netscape cookies.txt files, a line starting with #HttpOnly_ marks an HttpOnly cookie - the file format has no column for it, so the prefix is the convention. | Tools that strip the prefix without setting the flag silently report the cookie as JavaScript-readable. |
What the Cookie Inspector does
Cookies are small key-value pairs that a server tells your browser to store and send back on later requests. Each one can carry up to seven attributes, and each attribute changes where, when and how the cookie travels - which makes a raw cookie list nearly unreadable if you do not already know the rules. The Cookie Inspector turns that list into an explanation: for every cookie it shows the domain, path, expiry (as a real date with days remaining), size in bytes, and the three security flags, then writes one plain-English sentence per attribute about what it means for this specific cookie.
On top of the explanation it runs an audit. The audit checks the combinations that cause
real incidents: authentication cookies without Secure, session tokens that are
not HttpOnly (so any XSS can steal them), SameSite=None without
Secure (which modern browsers refuse to set at all), expired cookies still
sitting in the jar, conflicting Max-Age and Expires values, and -
if you supply the site's origin - third-party cookies that belong to a different domain.
Every finding is severity-graded (error, warning, info) with the fix spelled out, and the
whole set gets a 0-100 score with a letter grade.
How to use the Cookie Inspector
- Collect the cookies. Three common routes: in Chrome or Edge, open DevTools and go to Application → Cookies for the stored jar, or Network, click a request and read the
Set-Cookieentries under Response Headers. In the console on the page itself,document.cookieprints the JavaScript-visible cookies as one line. Any HTTP client can export a HAR file, which contains both. - Paste the result into the box above. The inspector detects the format automatically - Set-Cookie headers, document.cookie output, Netscape cookies.txt (including the
#HttpOnly_prefix) or HAR JSON - and says which one it picked. You can also load one of the four built-in samples to see a full analysis first. - Optionally enter the site's origin (e.g.
shop.example.com). With an origin set, any cookie whose domain does not cover that host is flagged as third-party - the classic case of an ad network's cookie living on your site. - Click Analyse. Read the findings top-down (errors first), then click any row in the table for a per-attribute explanation and a copyable
Set-Cookieheader that reproduces the cookie exactly. Column headers sort the table. - Export. Copy the full report as text, download it as
.txt, export the structured data as JSON, or copy a CSV for a spreadsheet. Cookie values are masked by default - tick "Mask cookie values" off only if you need the raw values in the report and you trust where it is going.
Worked example
Paste these three response headers (the "API session" sample button loads them):
Set-Cookie: access_token=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1LTQyIn0.a1b2c3; Path=/api; Secure; HttpOnly; SameSite=None; Max-Age=900
Set-Cookie: refresh_token=rr_55cc90d1e2; Path=/api/auth; Secure; HttpOnly; Max-Age=2592000
Set-Cookie: csrf=9f8e7d6c5b4a; Path=/
The inspector reports three cookies and two warnings. The first cookie is a short-lived
access token: 15 minutes from now (Max-Age=900), HTTPS-only, invisible to
JavaScript, and explicitly allowed cross-site - the standard shape for a Bearer-style API
session, so it scores well. The second is its 30-day companion for silent renewal, also
clean. The third is where the audit earns its keep: csrf carries no
Secure flag and no expiry at all, so it is a session cookie that will be sent
over plain HTTP if the site ever serves one - exactly the kind of token an attacker
captures on an unencrypted connection. The fix shown next to the finding is one attribute:
add Secure (and consider HttpOnly, since a CSRF token does not
need to be read by your own JavaScript).
How it works
Everything happens in your browser, in the page's JavaScript - there is no server endpoint
behind this tool and no network request to make. The parsing pipeline tries formats in a
fixed order: if the input parses as JSON with an entries array it is treated
as HAR (cookies are pulled from both the recorded requests and the Set-Cookie
response headers); otherwise lines with seven tab-separated fields are Netscape
cookies.txt; lines containing cookie attributes are parsed as
Set-Cookie grammar per RFC 6265 (name=value followed by
;-separated attributes, case-insensitive flag names, HTTP-date or
epoch-seconds expiry); anything left is split on semicolons as document.cookie
output. One honest limitation: document.cookie only exposes cookies that are
not HttpOnly, and it never includes any flags - so for that input the inspector shows
"not visible" rather than guessing, and skips flag-based warnings.
The audit is a set of explicit rules over the parsed attributes, not a score guesswork:
each rule names the condition it fires on and the one-line fix, severities are error
(broken or actively unsafe), warning (unsafe in common scenarios) and info (worth knowing).
The 0-100 score subtracts fixed points per finding, so two cookie sets with identical
findings always get the same grade. Expiry is evaluated against your machine's clock, and
Max-Age takes precedence over Expires exactly as browsers do.
Common mistakes
- Reading document.cookie as the whole picture. It cannot see HttpOnly cookies at all, so a "clean" read of two cookies may hide five more - including the session token. Use the DevTools Application panel or Set-Cookie headers for a full audit.
- SameSite=None without Secure. Modern Chrome, Edge, Firefox and Safari simply refuse to set such a cookie. The symptom is a cross-site integration that "worked last week" and now sends no cookie - the inspector flags this as an error because it is silent in the browser UI.
- Setting Max-Age and Expires to different values. Browsers obey Max-Age; your backend's expiry logic may obey Expires. The two then disagree, and the cookie dies (or lives) at a time nobody intended.
- Trusting the leading dot.
Domain=.example.comandDomain=example.commean the same thing since RFC 6265. The dot is legacy syntax, not a way to narrow scope - and a broader domain than your site hands the cookie to subdomains you do not run. - Forgetting the 4 KB limit. Stuffed analytics or cart cookies over ~4096 bytes get truncated or dropped per browser, and every response that carries them pays the header cost on every request.
- Confusing Path scoping with site scope. A cookie set by
/cart/checkoutwithout an explicitPath=/is only sent to URLs under/cart/checkout- a frequent cause of "the cart cookie vanished on the homepage".
Privacy
100% private. The parsing, audit and report generation all run in this page's JavaScript. Nothing you paste - cookie names, values, domains or HAR payloads - is transmitted to any server, written to storage or included in analytics. That matters more here than on most tools: a pasted cookie list can contain live session tokens, so treat the input box with the same care as a password field, and keep value masking on when you share the report.
Related tools
Suggested
Luke Keam | techgeek.biz