DEV Community

Weather Clock Dash
Weather Clock Dash

Posted on

Firefox Data Export: Bookmarks, Passwords, History, and Profile Migration Guide

Your browser data belongs to you. Firefox makes it relatively straightforward to export and migrate your bookmarks, passwords, history, and settings. Here's the complete guide.

What You Can Export from Firefox

Data Type Export Format Where
Bookmarks HTML or JSON Library → Bookmarks → Import/Export
Passwords CSV about:logins → Export
History Not directly exportable (SQLite database) Profile folder
Cookies Not directly exportable Profile folder (SQLite)
Extensions Not exportable (re-install required) —
Settings Not directly exportable Profile folder (prefs.js)
Certificates Varies Settings → Privacy → Certificates

Bookmarks Export

Quick export:

  1. Press Ctrl+Shift+O (or Bookmarks → Bookmarks menu → Bookmarks toolbar → Manage bookmarks)
  2. In the Library window: Import and Backup → Export Bookmarks to HTML
  3. Save the HTML file

HTML format: The exported file is a standard Netscape Bookmarks HTML format, compatible with every browser. You can import it into Chrome, Edge, Safari, or a new Firefox profile.

JSON backup (Firefox-specific, preserves more metadata):
Library → Import and Backup → Backup → saves as .jsonlz4 file
This format is Firefox-specific but captures folders, dates, and Firefox-specific data.

Import bookmarks: Library → Import and Backup → Import Bookmarks from HTML

Import from Chrome: Library → Import and Backup → Import Data from Another Browser → Select Chrome

Passwords Export

Export as CSV:

  1. Go to about:logins in address bar
  2. Click the three-dot menu (⋮) in the top right
  3. Select "Export Logins"
  4. Firefox warns you the CSV will be unencrypted — confirm
  5. Save the CSV file

CSV format:

"url","username","password","httpRealm","formActionOrigin","guid","timeCreated","timeLastUsed","timePasswordChanged"
Enter fullscreen mode Exit fullscreen mode

This CSV can be imported into:

  • Bitwarden: Import → Firefox CSV
  • 1Password: Import → Firefox
  • KeePass: Import via browser extension or CSV import
  • Chrome: Settings → Passwords → Import (CSV)
  • Another Firefox profile: about:logins → Import from a file

Important security note: The exported CSV contains all your passwords in plain text. Delete it after importing, or store it encrypted.

Your Firefox Profile Folder

For data types without GUI export, access the profile directly:

Find your profile folder: about:support → Profile Folder → Open Folder

The profile folder contains:

File Contents
places.sqlite Bookmarks AND history (SQLite database)
key4.db Encrypted passwords (master password key)
logins.json Encrypted passwords (the actual data)
cookies.sqlite Cookies
prefs.js All Firefox preferences
extensions/ Installed extensions
sessionstore-backups/ Recent session data
cert9.db Certificate trust store

To backup everything: Copy the entire profile folder. Restoring it on another Firefox installation restores everything.

Note: key4.db and logins.json work together. Copy BOTH to transfer passwords without going through CSV. The passwords stay encrypted.

Exporting History

History is stored in places.sqlite — a SQLite database.

With SQLite tools:

# Install sqlite3
apt install sqlite3  # Linux
brew install sqlite3  # macOS

# Export as CSV
sqlite3 ~/.mozilla/firefox/PROFILE/places.sqlite \
  ".mode csv" \
  ".output history.csv" \
  "SELECT url, title, visit_count, last_visit_date FROM moz_places WHERE visit_count > 0 ORDER BY last_visit_date DESC;"
Enter fullscreen mode Exit fullscreen mode

Windows: Profile is at %APPDATA%\Mozilla\Firefox\Profiles\PROFILE\places.sqlite

Python export:

import sqlite3
import shutil
import os

profile_path = os.path.expanduser("~/.mozilla/firefox")
profiles = [d for d in os.listdir(profile_path) if d.endswith('.default-release')]
db_path = os.path.join(profile_path, profiles[0], 'places.sqlite')

# Copy to avoid lock issues
shutil.copy(db_path, '/tmp/places_copy.sqlite')
conn = sqlite3.connect('/tmp/places_copy.sqlite')
cursor = conn.execute("""
    SELECT url, title, visit_count, 
           datetime(last_visit_date/1000000, 'unixepoch') as last_visit
    FROM moz_places 
    WHERE visit_count > 0 
    ORDER BY last_visit_date DESC 
    LIMIT 1000
""")

for row in cursor:
    print(row)
Enter fullscreen mode Exit fullscreen mode

Note: Copy the database before accessing it — SQLite will refuse to open a locked database (and Firefox locks it while running).

Migrating to a New Computer

Easiest method (Firefox Sync):

  1. On new computer, install Firefox
  2. Sign in to Firefox Account
  3. Sync handles bookmarks, passwords, history, extensions, preferences

Manual migration:

  1. On old computer: about:support → Open Profile Folder
  2. Close Firefox
  3. Copy the entire profile folder to new computer
  4. On new computer: about:support → Open Profile Folder → replace contents
  5. Or: Firefox → about:profiles → Create New Profile pointing to the copied folder

What sync doesn't cover:

  • Local site permissions (camera/mic access)
  • Certificates you've manually added
  • Custom user.js overrides
  • Session manager extension data (if not using Firefox Sync for extension storage)

Importing to Chrome

If you're switching:

Chrome import wizard:

  1. Chrome → Settings → Import bookmarks and settings
  2. Select "Mozilla Firefox"
  3. Check: Bookmarks, History, Passwords
  4. Click Import

This reads Firefox's profile directly (not via export file). Works on Windows/macOS. On Linux, Chrome can sometimes import directly but may need the HTML export method.

Exporting Passwords TO Firefox FROM Chrome

Chrome export:
Chrome → Settings → Passwords → Export → save CSV

Firefox import:
about:logins → Import from a file → select the CSV

Firefox Lockwise / about:logins

Firefox's password manager (about:logins) has no web portal anymore (Lockwise.firefox.com was shut down). All access is via:

  • Firefox desktop (about:logins)
  • Firefox mobile (three-dot → Passwords)

There's no way to access Firefox passwords from the web without having Firefox open.

Recommendation: If you need web access to passwords or a standalone password manager app, export from Firefox and import into Bitwarden (free, open source, excellent Firefox extension, has web portal).

Summary

Quick reference:

  • Bookmarks: Library → Export Bookmarks to HTML
  • Passwords: about:logins → ⋮ → Export Logins (CSV)
  • Everything: Copy profile folder (about:support → Profile Folder)
  • History: SQLite query of places.sqlite in profile folder
  • Cross-device sync: Firefox Account → Sync

Your data is yours — Firefox makes it accessible even if the tools for doing so aren't prominently advertised.

Top comments (0)