---
title: "Export Cookies From Chrome: 3 Methods and What Breaks"
description: "Chrome has no built-in cookie export. Learn how to export cookies from Chrome with an extension or script, pick JSON or Netscape format, and import safely."
url: "https://donutbrowser.com/ja/export-cookies-from-chrome/"
---

1. [ホーム](https://donutbrowser.com/ja/)

2. [ブログ](https://donutbrowser.com/ja/blog)

3. Export Cookies From Chrome: 3 Methods and What Breaks

# Export Cookies From Chrome: 3 Methods and What Breaks

October 25, 2026

chrome cookies cookie export httponly cookies

**To export cookies from Chrome you need an outside tool, because [Chrome’s DevTools](https://cookievault.net/en/how-to/export-cookies-json/) has no built-in export. Use an open-source extension for most jobs, a Playwright or Puppeteer script for automation, and document.cookie only as a limited fallback, since it can’t see [HttpOnly cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie).**

Agencies hand a client’s logged-in session to a teammate. QA engineers run tests with a logged-in test account. Others move to a new machine or keep a personal backup.

After reading, you can pick a method, export in the right format, check the file before you save it, and import it back. I make Donut Browser, but the advice is by trade-off, and Donut is only one option.

> **Key Takeaways**

> - Netscape cookies.txt drops `httpOnly` and `sameSite`, so keep a JSON export as your master copy.

> - Signing out of all devices, where a site offers it, ends the session and stops a leaked copy from working.

> - A session cookie moved to a different IP, timezone or fingerprint can still be refused.

## Can Chrome export cookies, and which method should you use?

Chrome has no built-in cookie export, so you need an extension, a script, or a limited console fallback.

![An abstract vector illustration showing stylized data discs being managed and analyzed with a technical wrench.](https://api.birchseek.com/m/kcdPWznPdfQ1HWafwojiz1BCM3gnwKUP.webp)

|  | Extension | Playwright or Puppeteer script | `document.cookie` in console | DevTools copy |
| --- | --- | --- | --- | --- |
| Captures | All or one site | Whole browser context | Current page only | Rows you select |
| HttpOnly | Check the file | Check the output | No | No |
| Format | Netscape or JSON | JSON you write | Plain text string | Pasted text |
| Best for | One-off exports | Repeated runs | Quick look | Reading one value |

Open DevTools, then Application, Storage, Cookies. The table lets you view and edit values, but [CookieVault](https://cookievault.net/en/how-to/export-cookies-json/) says plainly that “Chrome DevTools does not have a built-in export feature.”

Google’s [Export your data help page](https://support.google.com/chrome/answer/10248834?hl=en) covers “personal information you store in your Google Account” and doesn’t mention cookie files.

The **extension** is the default choice. [Get cookies.txt LOCALLY](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc) is a good example. It’s open source, so you can read the code before you install it.

The **script** suits repeated runs. Playwright’s `context.cookies()` works with any Chromium setup. This example reads a separate profile folder, not your daily Chrome:

```
import fs from 'node:fs';
import { chromium } from 'playwright';

const context = await chromium.launchPersistentContext('./chrome-profile');
const cookies = await context.cookies();
fs.writeFileSync('cookies.json', JSON.stringify(cookies, null, 2));
await context.close();
```

For Puppeteer, check its current API reference for the cookie methods before you script it.

The console fallback is weakest. [MDN’s Set-Cookie reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) says the HttpOnly attribute “forbids JavaScript from accessing the cookie, for example, through the Document.cookie property”, so `document.cookie` never shows those cookies.

**Best for, by option:**

- **Extension:** handing a session to a teammate, or a one-off backup.

- **Script:** QA runs that save and reload cookies every time.

- **`document.cookie`:** a quick look at non-HttpOnly cookies on one page.

- **DevTools copy:** checking a single value, not exporting.

## How do you export cookies from Chrome with an extension?

You export cookies from Chrome with an extension by vetting it first, installing it, choosing a scope and a format, saving the file, and checking it before you keep it.

1. **Vet the extension before you install it.** [Chrome’s extensions documentation](https://developer.chrome.com/docs/extensions/reference/api/cookies) says an exporter needs the `cookies` permission “along with host permissions for any hosts whose cookies you want to access.” Broad host access therefore means access to every site’s cookies, so read the permission prompt.

Get cookies.txt LOCALLY is an open-source example: its [Chrome Web Store listing](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc) says the source code is “open-source, unobfuscated” and available on GitHub. Check the repository and the current listing yourself for the version and permissions.

Skip any extension whose page says it isn’t publicly available. 2. **Install it** from the Chrome Web Store and pin it to the toolbar. 3. **Open the logged-in site** in a tab. Confirm you’re signed in, because a logged-out tab exports logged-out cookies. 4. **Choose the scope.** Pick the current site, not all sites. An all-sites export puts every login you have into one file, which is a bigger leak if the file escapes. 5. **Choose the format.** Pick Netscape `cookies.txt` for wget, curl or Python, and JSON when your own script reads named fields. The format section that follows compares the two. 6. **Export and save locally.** A file appears in your Downloads folder. Rename it after the site. 7. **Inspect the file before you keep it.** Open it in a text editor and run this checklist:

- Read the domain column and confirm only the intended site appears.

- Delete any lines from other sites.

- Search for session or token cookie names, such as `session` or `token`, to confirm the login cookies are there.

- If the file is empty or has only a few lines, you probably exported from the wrong tab.

## Why do document.cookie and DevTools copying miss HttpOnly cookies?

HttpOnly is a Set-Cookie attribute that hides a cookie from JavaScript, so `document.cookie` and any console export miss it, often including the session cookie.

Sites usually mark their login cookie HttpOnly so a malicious page script can’t steal it. That’s the same cookie you want in an export.

[MDN’s Set-Cookie page](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) defines the four attributes that matter here:

- **HttpOnly**: “Forbids JavaScript from accessing the cookie”, including through `document.cookie`.

- **Secure**: the browser sends the cookie only over an `https:` request.

- **SameSite**: controls whether the cookie travels with cross-site requests.

- **Partitioned**: the cookie is stored in partitioned storage.

[MDN’s Document.cookie page](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie) describes the return value as a semicolon-separated list of cookies, so you get `name=value` pairs and none of those four flags.

A console export of a site with an HttpOnly session cookie therefore looks complete, then logs you out the moment you import it. Hand-copying from the DevTools table has the same weakness: you get visible text, not a file an importer can read with its flags intact.

An extension using the chrome.cookies API gets the full record, and [Chrome’s documentation](https://developer.chrome.com/docs/extensions/reference/api/cookies) lists an `httpOnly` field on each cookie. For scripts, [CookieVault](https://cookievault.net/en/how-to/export-cookies-json/) points to Puppeteer’s `page.cookies()` and Playwright’s `context.cookies()`, which read cookies from the browser itself, not from page JavaScript.

## JSON or Netscape cookies.txt: which format do you need?

Choose Netscape cookies.txt if a command-line tool or Python reads the file, and JSON if you need every attribute or want to feed Playwright. Pick before you export, because converting later loses data.

**JSON** names each field: `name`, `value`, `domain`, `path`, `expires`, `httpOnly`, `secure`, `sameSite`. The [`chrome.cookies` reference](https://developer.chrome.com/docs/extensions/reference/api/cookies) also lists `partitionKey`, used for partitioned cookies. Field names vary a little between extensions.

**Netscape cookies.txt** is one cookie per line, with seven tab-separated fields: domain, include-subdomains flag, path, secure flag, expiry (Unix time), name, value.

```
.example.com	TRUE	/	TRUE	1893456000	session_id	abc123
```

This line has no column for `httpOnly` or `sameSite`, so a Netscape export drops both.

The table paraphrases each tool’s own documentation. For curl and wget, that is the [curl man page](https://curl.se/docs/manpage.html) and the [GNU Wget manual](https://www.gnu.org/software/wget/manual/wget.html).

The next two rows come from the [yt-dlp README](https://github.com/yt-dlp/yt-dlp) and [Python’s http.cookiejar documentation](https://docs.python.org/3/library/http.cookiejar.html).

| Tool | Reads | What its docs say |
| --- | --- | --- |
| curl | Netscape | `-b` reads cookies, `-c` writes them |
| wget | Netscape | `--load-cookies` takes a Netscape-style file |
| yt-dlp | Netscape | `--cookies FILE` |
| Python `MozillaCookieJar` | Netscape | loads and saves cookies.txt files |
| Playwright `addCookies` | JSON-style objects | adds cookies to a browser context |

The extension “ [Get cookies.txt LOCALLY](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc)” states that its Netscape format “is compatible with wget, curl, MozillaCookieJar(Python3), and more.” It also exports JSON.

To test a file with curl, run `curl -b cookies.txt https://example.com`, which sends the cookies from your file. Adding `-c cookies.txt` writes the updated jar back after the request.

If you’re unsure, export JSON as your master copy, since it keeps every attribute. Then make a Netscape copy for the tools that need it.

## How should you store and delete an exported cookie file?

Store an exported cookie file as you would a password, because whoever holds live session cookies may be able to act as the logged-in user until that session ends, without a password.

**Where it should live**

- Keep it on an encrypted disk or inside a password-protected archive.

- Never put it in email, chat, a shared drive or a git repository.

- Never upload it to an online converter. Convert it with a local tool instead.

That last rule is why the extension you pick matters. The [Get cookies.txt LOCALLY listing](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc) says the extension “never transmits your information externally.” That is the behavior you want from anything that touches this file.

**How to delete it**

When the job is done, delete the file and empty the trash. On a shared machine, also check the downloads folder and any cloud-synced folder, since a synced copy survives after you delete the local one.

**How to make an old or leaked copy useless**

Sign out of the site. If it has a “sign out of all devices” option, use that. Once the server ends the session, a saved copy of the cookie stops working.

If the file may have leaked, change the password as well.

**Agency handovers**

Use the client’s own access controls where possible, such as a delegated role or a team seat on the platform. If a cookie file is the only way, export only the one site the client agreed to, not everything in the browser.

## How do you import exported Chrome cookies, and what can break?

You import exported Chrome cookies by loading the file into a script, a command-line tool or the target browser, then checking that the site still treats you as signed in.

1. **Open the file and check the `expires` values.** A cookie whose expiry is in the past is dropped on load, so an old export can give you nothing.

2. **Load the file with the route that matches its format.**

- **Playwright:** pass JSON to `context.addCookies()`. [Playwright’s documentation](https://playwright.dev/docs/api/class-browsercontext) says the method “Adds cookies into this browser context.” Test with one cookie first, because extension JSON can name fields differently.

- **curl:** run `curl -b cookies.txt https://example.com/` with a Netscape file.

- **Another browser or profile:** use an import feature or extension in the target. [CookieVault](https://cookievault.net/en/how-to/export-cookies-json/) describes an exported file as something that can be “imported into another browser profile”.

1. **Open a page that needs a login.** Success is your account page, not the sign-in form.

```
const cookies = JSON.parse(fs.readFileSync('cookies.json', 'utf8'));
await context.addCookies(cookies);
```

### What can break

A valid cookie file does not guarantee that the site accepts the login. Three things commonly fail:

- **Expired cookies.** The `expires` date has passed, so the browser discards them.

- **Ended sessions.** If you signed out or changed the password, the site may have ended that session on its server. The cookie then does nothing.

- **A different context.** A session created from a New York IP that now arrives with an `Asia/Ho_Chi_Minh` timezone is a mismatch a site can notice. The same goes for a different device or [browser fingerprint](https://donutbrowser.com/browser-fingerprinting/).

For the third case, keep the IP, timezone and language consistent. The guide to [matching a proxy to a profile](https://donutbrowser.com/proxies-for-anti-detect-browsers/) covers how. Even then, the site decides, so treat a working import as a bonus, not a guarantee.

## Can you skip the cookie file and move a Chrome profile instead?

Yes, you can skip the cookie file: moving a whole Chrome profile brings the logins along, because a profile carries its own cookie store. Donut Browser, the open-source browser I build, works this way.

In Donut Browser every profile has its own cookies. Cookie import and export is available per profile on the free plan, with no account needed.

To move logins without a hand-built file, import the Chrome profile itself. Donut Browser accepts Chrome, Edge, Brave and other Chromium browsers, as a folder or a ZIP. The [profile import docs](https://donutbrowser.com/docs/profile-import/) walk through the steps.

Everything stays on your machine, and the app sends no telemetry. No cookie file gets uploaded anywhere.

Automation is a separate question. Launching a Donut profile with a CDP port so Playwright or Puppeteer can attach needs the [Pro plan](https://donutbrowser.com/pro/), which carries the Browser Manipulation API per the [pricing page](https://donutbrowser.com/pricing/).

The [browser automation use case page](https://donutbrowser.com/use-cases/automation) covers that setup in more detail.

A moved profile still faces the platform’s own checks, and Donut doesn’t promise accounts are never banned. For the background, read [what an anti-detect browser is and how per-profile cookie stores work](https://donutbrowser.com/what-is-an-anti-detect-browser/).

To see it for yourself, [download Donut Browser](https://donutbrowser.com) and import one Chrome profile.

## Frequently asked questions

### Can you export cookies from Chrome without an extension?

**Yes, with a Playwright or Puppeteer script.** [Chrome DevTools](https://cookievault.net/en/how-to/export-cookies-json/) has no built-in export feature, and `document.cookie` only returns what page JavaScript can read. Playwright’s `context.cookies()` and Puppeteer’s `page.cookies()` return the cookies from a browser context, and you save them to a file yourself.

### Is it safe to use a cookie export extension?

**It’s safe only if you check the extension first.** Read its permissions, confirm the source is public, and make sure nothing leaves your machine. The [Get cookies.txt LOCALLY listing](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc) says its code is open-source and unobfuscated and that it never transmits your information externally. Verify that on GitHub.

### Will exported cookies keep me logged in on another computer?

**Not reliably.** A cookie stops working when it expires, and a site can reject a session that arrives from a different IP address or device. Test the import once before you rely on it.

### Why is my exported cookie file missing my login cookie?

**The login cookie is probably marked HttpOnly.** That flag hides a cookie from page JavaScript, so `document.cookie` and console exports never see it. Export again with an extension or script that reads the browser’s cookie store directly, then check the file for the session cookie by name.

## What should you do next with your Chrome cookie export?

Start with a single-site export today, test it this week, and switch to per-profile cookie stores if you move accounts often.

**Today:** Pick your method from the comparison table, check the extension’s permissions and source, and export one site only. Skip “all sites” unless the job needs it.

**This week:** Test the file with the tool that will read it. Store it encrypted, then delete it and sign out of the old sessions.

**Longer term:** If you keep moving accounts between machines, stop passing files around. Per-profile cookie stores keep each login in its own container. [Donut Browser’s free plan](https://donutbrowser.com/pricing/) has unlimited local profiles with per-profile cookie import and export, no account needed.

[Download Donut Browser](https://donutbrowser.com), which is free, open source and has zero telemetry. Paid plans add things like backups and automation, so see [pricing](https://donutbrowser.com/pricing) for what each one covers.

## Sources

[How to export Chrome cookies to JSON - CookieVault](https://cookievault.net/en/how-to/export-cookies-json/) · [Get cookies.txt LOCALLY - Chrome Web Store](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc) · [Set-Cookie header - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) · [Export your data from Chrome - Google Help](https://support.google.com/chrome/answer/10248834?hl=en) · [chrome.cookies | Chrome for Developers](https://developer.chrome.com/docs/extensions/reference/api/cookies) · [Document: cookie property | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie) · [BrowserContext | Playwright](https://playwright.dev/docs/api/class-browsercontext) · [Pricing: Free Forever, Solo, Pro and Team — Donut Browser](https://donutbrowser.com/pricing/). Every other source is linked where the article cites it.

## Google で当サイトをもっと見る

ワンクリックで Donut Browser を Google アカウントの優先ソースに設定すると、トップニュース、AI モード、AI による概要で当サイトの記事が表示されやすくなります。

Google で優先ソースに設定

## On this page

- Can Chrome export cookies, and which method should you use?

- How do you export cookies from Chrome with an extension?

- Why do document.cookie and DevTools copying miss HttpOnly cookies?

- JSON or Netscape cookies.txt: which format do you need?

- How should you store and delete an exported cookie file?

- How do you import exported Chrome cookies, and what can break?

- What can break

- Can you skip the cookie file and move a Chrome profile instead?

- Frequently asked questions

- Can you export cookies from Chrome without an extension?

- Is it safe to use a cookie export extension?

- Will exported cookies keep me logged in on another computer?

- Why is my exported cookie file missing my login cookie?

- What should you do next with your Chrome cookie export?

- Sources
