Cookie Parser & Set-Cookie Builder — Free Online Tool

Parse Cookie and Set-Cookie headers locally, inspect attributes, and build correct Secure, HttpOnly, SameSite cookie values.

Use this free online Cookie Parser & Set-Cookie Builder directly in your browser. No signup required, no data leaves your device. Part of Utilier — a collection of 133+ developer utilities.

What is Cookie Parser & Set-Cookie Builder?

HTTP cookies are small name-value pairs that a browser stores and sends back with matching requests. A Cookie request header normally contains only pairs, while a Set-Cookie response header can define scope, lifetime, and security attributes. This offline tool separates those pieces so a header is easier to inspect and rebuild.

Why use cookie parser?

Cookie bugs often look like authentication or routing failures. Seeing each attribute makes it clear why a browser did not store, send, or expose a cookie.

When to use cookie parser

Use it when debugging login sessions, cross-site requests, preview environments, API responses, or a browser warning about an invalid Set-Cookie header. Never paste production secrets into a shared browser profile.

How to use cookie parser

Paste an existing header to inspect it, then adjust the builder fields.

  1. Paste a header: Use a Cookie or Set-Cookie value from a local test, sanitized log, or browser network panel.
  2. Review attributes: Check Path, Domain, Secure, HttpOnly, SameSite, Max-Age, and Expires.
  3. Build a replacement: Set the name and value, then select only the attributes needed by the response.
  4. Test in the target browser: Inspect the browser's storage and network panels after receiving the actual response.

Key features

  • Attribute parser: Breaks a Set-Cookie value into readable flags and key-value attributes.
  • Header builder: Produces a copyable Set-Cookie value from editable fields.
  • Security explanations: Explains the behavior of Secure, HttpOnly, SameSite, Path, Domain, and Max-Age.

Common use cases

  • Session debugging: Check why a login cookie was not persisted after an API response.
  • Cross-site integration: Build a SameSite=None; Secure cookie for an intentional cross-site flow.
  • Support reproduction: Share a sanitized cookie configuration without exposing its original value.

Examples

Hardened session cookie

session=abc123; Path=/; HttpOnly; Secure; SameSite=Lax; Max-Age=3600
A host-only, HTTPS-only session cookie with a one-hour lifetime.

Cross-site embedded flow

widget_session=abc123; Path=/; SameSite=None; Secure
A cookie eligible for intentional cross-site requests over HTTPS.

Technical reference

Cookie attributes that commonly change browser behavior.

Secure
Allows the browser to send the cookie only over HTTPS, except limited localhost handling.
HttpOnly
Prevents JavaScript from reading the cookie through document.cookie; it is still included in matching HTTP requests.
SameSite
Strict and Lax limit cross-site sending. None permits it but requires Secure in modern browsers.
Domain and Path
Define which hosts and URL paths receive the cookie. Omit Domain for a host-only cookie.
Max-Age and Expires
Control persistence. Max-Age is measured in seconds and takes precedence when both are present.

Common mistakes to avoid

Using SameSite=None without Secure

Why it happens: Modern browsers reject this combination.

How to avoid it: Use HTTPS and include Secure whenever SameSite=None is required.

Setting Domain unnecessarily

Why it happens: A domain cookie reaches subdomains and has a broader exposure surface.

How to avoid it: Omit Domain unless multiple subdomains truly need the cookie.

Treating HttpOnly as CSRF protection

Why it happens: HttpOnly protects against script reads, not request forgery.

How to avoid it: Use an appropriate SameSite policy and server-side CSRF defenses.

Frequently asked questions

Does HttpOnly stop the cookie from being sent?

No. It prevents JavaScript access but lets the browser send the cookie with matching HTTP requests.

Which SameSite value should I use?

Lax is a common default. Use Strict for stronger navigation restrictions or None plus Secure for an intentional cross-site workflow.

What deletes a cookie?

A Set-Cookie response with the same name, path, and domain plus Max-Age=0 or an expiration date in the past removes it.

Is the pasted cookie uploaded?

No. This tool processes the header locally in the browser.

References

Privacy and availability

  • Runs entirely in your browser — zero server processing
  • No signup or account required
  • Works offline once loaded
  • Fast, lightweight, no external dependencies
  • Available as a browser extension for Chrome and Firefox