browserforensics
Back to all articles

Firefox history file locations

2026-05-19 · 2 min

Firefox profiles live in a randomly-named directory under Profiles/, typically <random>.default-release for a fresh install. On Windows the cache splits across Roaming and Local — a subtle thing that catches people who copy only Roaming and wonder why the cache pivot turned up nothing.

Profile root by OS

Windows

C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>
C:\Users\<user>\AppData\Local\Mozilla\Firefox\Profiles\<profile>\cache2

macOS

/Users/<user>/Library/Application Support/Firefox/Profiles/<profile>
/Users/<user>/Library/Caches/Firefox/Profiles/<profile>/cache2

Linux

/home/<user>/.mozilla/firefox/<profile>
/home/<user>/.cache/mozilla/firefox/<profile>/cache2

profiles.ini at the parent level maps each profile name to its directory. Useful when a user has more than one profile and you need to identify the default.

What each file holds

FileFormatWhat's inside
places.sqliteSQLitemoz_places, moz_historyvisits, moz_bookmarks, moz_annos (downloads)
cookies.sqliteSQLitemoz_cookies (plain values)
formhistory.sqliteSQLitemoz_formhistory
favicons.sqliteSQLitemoz_icons, moz_pages_w_icons
webappsstore.sqliteSQLiteLocalStorage (origin → key → value)
logins.json + key4.dbJSON + NSSSaved credentials (encrypted with profile key)
sessionstore.jsonlz4mozLz4 + JSONCurrently open tabs
sessionstore-backups/recovery.jsonlz4mozLz4 + JSONMost recent backup
sessionstore-backups/previous.jsonlz4mozLz4 + JSONTabs from the last session
prefs.js, user.jsTextConfiguration

moz_annos is easy to overlook — it carries the download metadata Firefox no longer stores in a separate downloads.sqlite. Filter on anno_attribute_id joined against moz_anno_attributes for the actual attribute name.

Timestamps and WAL

Firefox uses PRTime — microseconds since the Unix epoch — for most columns. See browser timestamp formats for the per-column exceptions in moz_cookies.

places.sqlite runs in WAL mode. Always pull places.sqlite-wal and places.sqlite-shm together. The WAL recovery post covers checkpointing.

Acquisition notes

  • The .jsonlz4 session files use Mozilla's LZ4 variant (mozLz40 magic), not standard LZ4. Decompress with a parser that knows the header or with lz4json.
  • key4.db is required to decrypt logins.json. Without the user's master password (often blank), tools like firefox_decrypt recover credentials offline.
  • Cache2 is a content-addressed cache. Each file's name is a SHA-1 of the URL; the metadata sits at the end of the file. Useful when you need to prove a page was rendered, not merely visited.

Further reading