Software & Applicationssoftware-and-applicationsBrowsers & Extensionsbrowsers-and-extensions

How To Export Firefox Cookies

how-to-export-firefox-cookies

If you need to export Firefox cookies, the honest answer is that Firefox has no built-in menu option for doing it. You have two real paths: install an extension to generate a standard cookies.txt file, or manually copy the raw cookies.sqlite database from your profile folder, each serves a different purpose.

The truth about how to export Firefox cookies

Firefox does not provide a direct, built-in export function through its standard interface or settings. Every cookie you accumulate is stored in a single SQLite database file named cookies.sqlite, tucked inside your profile folder. That file is not meant to be shared directly with other browsers or command-line tools, because it's a raw database, not a portable text format. So the practical choice comes down to using an extension for a universally readable file, or copying the database itself when you need an exact backup of everything Firefox has stored. If you are moving your entire browser setup, you can also transfer Firefox bookmarks to a new computer to keep your saved sites intact alongside your cookies.

Method 1: Use an extension to export a usable cookies.txt file

The most reliable way to get cookies into a standard format is to install an extension from the Firefox Add-ons store. Extensions like "cookies.txt" or "Export Cookies" do exactly what you need, they read the database and produce a file in the Netscape HTTP Cookie File format, which is a plain-text format that other tools and browsers recognize.

  1. Search for "cookies.txt" or "Export Cookies" in the search bar.
  2. Once installed, the extension's icon appears in your toolbar. Click it to open the export panel.
  3. Most extensions default to the Netscape format, which is what you want for compatibility.
  4. Save the resulting .txt file to a location you can find later.

After the export finishes, open the file with a text editor to verify it contains lines starting with domains like .example.com followed by tab-separated fields. That's the standard Netscape cookie format, ready for use with other tools.

Method 2: Manually copy the cookies.sqlite database file

If you need an exact copy of every cookie exactly as Firefox stores it, including metadata that text formats lose, you can copy the database file directly. This is the better approach when you want to restore cookies into another Firefox profile or keep a complete backup.

  1. Close Firefox completely. This is not optional, copying cookies.sqlite while Firefox is running risks corrupting the file, as the database is actively written to during browsing.
  2. Open your profile folder by typing about:support into the Firefox address bar and pressing Enter.
  3. On the Troubleshooting Information page, look under the "Application Basics" section for the row labeled "Profile Folder" or "Profile Directory."
  4. Click the button next to it, it will say "Open Folder" on Windows or "Show Folder" on macOS, to open the profile directory in your file manager.
  5. Locate the file named cookies.sqlite in that folder. There may also be a cookies.sqlite-wal or cookies.sqlite-shm file; you only need the main cookies.sqlite file.
  6. Copy cookies.sqlite to your desired destination, such as a USB drive or a backup folder.

Remember that this file is not human-readable, it's a binary SQLite database. Opening it in a text editor will show gibberish. To use it, you'd need to place it back into a Firefox profile folder (with Firefox closed) or read it with a SQLite database tool.

Why you might need to export your cookies

Exporting cookies serves several practical purposes. If you're migrating to a new browser or a fresh Firefox profile, having a cookies.txt file lets you restore your login sessions and site preferences without re-entering credentials. For web scraping, you can use the Netscape-formatted file directly with command-line tools like curl or wget, both accept a cookie file via the -b or --cookie flag, letting you maintain authenticated sessions during automated requests. Debugging also benefits: when you need to test how a server responds to a specific session state, the exported file gives you a snapshot of exactly what cookies are active. The extension-based export is the right choice for these scenarios because the Netscape format is the de facto standard for cookie interchange across tools and scripts. The manual database copy, by contrast, is only useful for Firefox-to-Firefox restoration or forensic analysis, not for feeding cookies into other applications. So pick the method that matches your goal: extension for portability, database copy for completeness.

Sources

The steps on this page were checked against the following documentation. Last verified 17 September 2026.

  1. Mozilla — https://support.mozilla.org/en-US/kb/cookies-information-websites-store-on-your-computer
  2. Archiveteam — http://justsolve.archiveteam.org/wiki/Firefox_cookie_database
  3. Superuser — https://superuser.com
  4. Cyberengage — https://www.cyberengage.org/post/firefox-cookies--download-history--auto-complete-data-a-forens…
  5. Foxtonforensics — https://www.foxtonforensics.com/browser-history-examiner/firefox-history-location
  6. Mozilla — https://support.mozilla.org/en-US/questions/904767

About the author

Doria English is not just a contributor at Robots.net; she is a visionary exploring the vast landscapes of virtual reality (VR).

View all 99 articles by Doria English  ·  Our editorial policy

Leave a Reply

Your email address will not be published. Required fields are marked *