6 min read Updated July 26, 2026

How to Edit Cookies in Chrome (2026 Guide)

Three ways to view and change browser cookies — DevTools, an extension, and the command line — with the attribute rules that decide whether your edit sticks.

ChromeDebugging

Cookies hold session tokens, feature flags, consent state and A/B assignments. When you are debugging a login flow or reproducing a customer's bug, being able to change one and reload is the difference between a five-second check and a twenty-minute detour. Chrome gives you three practical ways to do it.

Method 1: Chrome DevTools

Nothing to install, best for a quick look at a single page.

  1. Press F12 (or Ctrl + Shift + I).
  2. Open the Application panel.
  3. In the sidebar choose Storage → Cookies and pick the origin.
  4. Double-click a cell to edit the value, domain, path, expiry or flags, then reload.

DevTools lists HttpOnly cookies too, because it reads them through the browser rather than through page JavaScript. What it does not do is bulk work: there is no import, no export and no conversion between formats — you copy rows by hand.

Method 2: A cookie editor extension

An extension keeps the whole job in one popup and survives reloads and navigation. With CookieMan the loop is:

  1. Open the site and click the toolbar icon — every cookie for that domain is listed.
  2. Filter by name, value or domain with search.
  3. Click a cookie to edit any attribute, or + Add to create one.
  4. Save. The list and the badge count update as the browser applies the change.

The same popup imports a whole set from JSON or cookies.txt and exports in six formats, which is what makes it useful for moving a session into curl or another profile. The install guide covers setup click by click.

Method 3: The console, with real limits

From DevTools you can write a cookie for the current document:

document.cookie =
  'theme=dark; path=/; max-age=2592000; samesite=lax';

Useful, but it cannot do several things people expect:

  • It cannot read or write HttpOnly cookies — that is the entire point of the flag.
  • It cannot set a cookie for another site, only the current document's domain and its parents.
  • Secure cookies can only be set from a trustworthy origin — HTTPS, or localhost.
  • There is no delete: you overwrite the cookie with an expiry in the past.

Why your edit did not stick

Most "the cookie disappeared" reports come down to a rule the browser applied silently. The ones worth memorising:

Rule What happens if you break it
SameSite=None requires Secure The cookie is rejected outright.
__Host- requires Secure, Path=/ and no Domain Rejected if any of the three is wrong.
__Secure- requires Secure Rejected on a plain HTTP origin.
Partitioned (CHIPS) requires Secure Rejected, or stored in a different partition than you expected.
Chrome caps cookie lifetime at 400 days A longer expiry is quietly trimmed.
The domain must match the origin you are on Setting .example.com from another site fails.
Roughly 4 KB per cookie Oversized values are dropped, often with no console message.

A related trap: a host-only cookie (no Domain attribute) is not sent to subdomains, while .example.com is sent to all of them. Copy a cookie between environments without matching that flag and you get a session that looks present but never authenticates.

What people actually use this for

  • Testing auth — expire a session cookie by hand instead of waiting an hour.
  • Flipping an experiment — change the variant cookie and reload.
  • Debugging third-party cookies — check whether a cookie is partitioned or blocked inside an iframe.
  • Feeding automation — export the logged-in state for curl, Playwright or CI.

For that last one the interchange format matters: see the cookies.txt explainer, curl -b cookies.txt, __Host- rejected by Chrome, or paste what you have into the online converter.

Treat exported cookies like passwords

A session cookie is a credential. Anyone holding the file can usually resume the session, so keep exports out of shared documents and support tickets, and delete them when you are done. CookieMan works entirely on your machine — no upload, no analytics — precisely because that data has no business leaving it.

5 min read

Netscape cookies.txt Format Explained

The seven tab-separated fields of cookies.txt, the #HttpOnly_ prefix, expiry handling, and how to convert the format for curl, wget and yt-dlp.

Formatscurl Read the guide
6 min read

Import and Export Cookies Between Browsers

Move a logged-in session from one browser or profile to another without losing attributes — which format to pick, and why some cookies refuse to travel.

WorkflowFormats Read the guide

Try it on your own cookies

CookieMan does everything in this guide from a popup — inspect, edit, import and export.

Free and MIT-licensed · Chrome, Edge and other Chromium browsers · Nothing leaves your machine