Regex Cheatsheet
Every regex token, searchable, with an example of what it matches.
Parse Set-Cookie and Cookie headers, and check the security flags.
The Cookie Parser splits a Set-Cookie header into its name, decoded value and every attribute, then reviews the security flags — including the __Host- and __Secure- prefix rules browsers enforce silently.
Paste a Set-Cookie header and it is pulled apart into the cookie name, its decoded value, and every attribute: Domain, Path, Expires, Max-Age, SameSite and the flags. A plain Cookie header, which carries many cookies and no attributes, is recognised and split as well.
The security review is the point. A cookie without Secure travels over plain HTTP. One without HttpOnly can be read by any script on the page, which is how a session is stolen. A missing SameSite now defaults to Lax but should be explicit. SameSite=None without Secure is rejected outright by browsers. The __Host- and __Secure- prefixes impose extra rules that browsers enforce silently, and those are checked too.
Set-Cookie carries one cookie and its attributes; Cookie carries many and none. The parser tells which it received and splits accordingly.
Missing Secure, missing HttpOnly and a missing SameSite each get an explanation of what they expose.
__Host- requires Secure, Path=/ and no Domain; __Secure- requires Secure. Browsers silently reject cookies that break those, and this catches it.
It requires Secure, and a cookie missing it is rejected outright — a failure that is otherwise invisible.
Percent-encoded cookie values are decoded, so you can read what is actually stored.
A Set-Cookie line, or a whole Cookie header of name=value pairs.
Every attribute is listed with what it does, and expiry dates are made readable.
Secure, HttpOnly and SameSite are each assessed rather than just reported.
If the name starts with __Host- or __Secure-, the extra requirements are checked.
It controls whether the cookie is sent on requests from other sites. Strict never sends it cross-site, Lax sends it on top-level navigations only, and None always sends it but requires Secure.
It is a promise the browser enforces: the cookie must have Secure, must have Path=/, and must have no Domain attribute. That makes it impossible for a subdomain to overwrite, which closes a real attack.
Because it has neither Expires nor Max-Age, which makes it a session cookie. Add one of those to make it persist.
Max-Age is a number of seconds and is immune to clock skew; Expires is an absolute date and is understood by older clients. Setting both is common, and Max-Age wins where both are present.
What people who use the Cookie Parser think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Cookie Parser. It takes half a minute and no account.
Write the first reviewEvery regex token, searchable, with an example of what it matches.
Estimate how long a password would survive, and see exactly what weakens it.
Encode and decode Base32, including the Crockford and hex variants.
Fill in the fields and get a complete README.md in Markdown.
Check a JWT signature against a secret or a public key, and see why it fails.
Turn a JSON object into a TOML document with proper tables and arrays of tables.
Convert a TOML config to JSON, with tables and arrays of tables resolved.
Test a regular expression live, with every match and capture group shown.