1 Profiles and their files
| Chrome (and Edge, Brave, Opera: Chromium) | Firefox | |
|---|---|---|
| Windows | %LOCALAPPDATA%\Google\Chrome\User Data\Default\ | %APPDATA%\Mozilla\Firefox\Profiles\<id>.default-release\ |
| macOS | ~/Library/Application Support/Google/Chrome/Default/ | ~/Library/Application Support/Firefox/Profiles/<id>/ |
| Linux | ~/.config/google-chrome/Default/ | ~/.mozilla/firefox/<id>/ (Snap: ~/snap/firefox/common/.mozilla/) |
| History | History: urls, visits, downloads, keyword_search_terms | places.sqlite: moz_places, moz_historyvisits, bookmarks, download annotations |
| Cookies | Network/Cookies (values encrypted) | cookies.sqlite (plain text) |
| Passwords, forms | Login Data, Web Data (encrypted) | logins.json + key4.db, formhistory.sqlite |
| Open tabs | Sessions/ (Session_…, Tabs_…) | sessionstore-backups/recovery.jsonlz4 |
| Cache | Cache/Cache_Data/ (in the local, non-roaming profile) | cache2/entries/ (Windows: under %LOCALAPPDATA%) |
| Time format | WebKit: µs since 1601-01-01 UTC | PRTime: µs since 1970-01-01 UTC |
Close the browser, or copy the databases together with their -journal/-wal files
(Firefox keeps places.sqlite in WAL mode, see the WAL page).
Several profiles are common (Profile 1, Profile 2, several Firefox profile folders):
check Local State and profiles.ini.
2 Chrome: urls and visits
Chrome splits history into two tables. urls has one row per address, with a visit counter
and the last visit time. visits has one row per visit, pointing to urls.id,
with the exact time, the visit it came from (from_visit) and how it happened
(transition). The sample is a cut-down History file with the real column names; the real
tables have a few more columns.
Four live rows, rowids 1, 2, 3 and 5. Rowid 4 is missing, and the freeblock still holds it: robin removed
quick-loans.example.net from the history. The deleted row's last visit time survives too. Its visit
is in a freeblock of the visits table:
secure_delete off to show the SQLite
mechanism. Chrome and Firefox build SQLite with secure delete enabled, so they overwrite freed cells with zeros. In
real cases deleted history is found instead in the rollback journal (History-journal) or the WAL,
in volume shadow copies and backups, in unallocated space of the file system, and in other artefacts (session
files, cache, DNS and proxy logs). The SQLite page explains what
survives when secure delete is off, as in many apps.The visits joined with their URLs (builder output)
How did the user get there? The transition
The low byte of transition is the core type, the high bits are qualifiers. It separates a typed
address from a clicked link or a page that loaded by itself, which matters when someone says "I never went
there, it just opened".
Transition decoder
3 Downloads and searches
The downloads table keeps the target path, size, start and end time, whether the file was opened,
and the page it came from (referrer, tab_url; the full redirect chain is in
downloads_url_chains). The file itself may be long deleted; the row stays until the user clears
the download list.
Searches typed into the address bar get their own table, keyword_search_terms, linked to the result
page in urls. It has no INTEGER PRIMARY KEY, so all four columns are stored.
4 Firefox: places.sqlite
Firefox uses the same idea with other names: moz_places (one row per URL, with a
reversed host name rev_host for fast lookups and a frecency score for the address bar)
and moz_historyvisits (one row per visit). Times are PRTime, microseconds since 1970.
The visits joined with their URLs (builder output)
| visit_type | Meaning | visit_type | Meaning |
|---|---|---|---|
| 1 | LINK: followed a link | 6 | REDIRECT_TEMPORARY (302) |
| 2 | TYPED: typed or picked from the address bar | 7 | DOWNLOAD |
| 3 | BOOKMARK | 8 | FRAMED_LINK: link inside a frame |
| 4 | EMBED: loaded inside a page | 9 | RELOAD |
| 5 | REDIRECT_PERMANENT (301) |
Firefox stores download details (target file, end time, size) as annotations in moz_annos, linked
to the moz_places row of the download URL.
5 Open tabs: the session file
To restore tabs after a crash, Firefox writes the whole session (windows, tabs, back/forward history, scroll
positions, sometimes form contents) every few seconds to sessionstore-backups/recovery.jsonlz4. The
file is JSON compressed with LZ4 behind Firefox's own 12-byte header. LZ4 is simple enough to follow by
hand: each sequence copies some literal bytes, then repeats a stretch of earlier output.
The decompressed JSON (builder output)
Session files can show pages that were never written to the history: a tab can be open without a new visit,
and closed tabs stay in _closedTabs for a while. Chrome keeps the same kind of data in its
Sessions folder (a binary "SNSS" command log).
6 Encryption, private windows, sync
- Encrypted values. Chromium encrypts cookie values and saved passwords with a key protected by the OS:
DPAPI on Windows (plus app-bound encryption since Chrome 127), the "Chrome Safe Storage" item in the macOS
Keychain, the GNOME keyring or KWallet on Linux. On Linux without a keyring Chromium falls back to a fixed,
publicly known key, so those values decrypt directly. With DPAPI you need the user's password (or the domain's
backup key), and app-bound values additionally need SYSTEM-level DPAPI keys of that computer. Without these
secrets an image gives you the URLs and times but not the values. Firefox protects
logins.jsonwithkey4.dband an optional primary password. - Private windows write no history, cookies or session files to disk. Traces can still exist in memory, the page file or hibernation file, the DNS cache, proxy and firewall logs, and in OS artefacts such as prefetch (the browser ran) and downloaded files.
- Sync. A signed-in browser merges history from other devices. A visit in the database is not proof that
it happened on this computer: Chrome's
visitstable has columns that mark synced visits, and Firefox'smoz_historyvisitshas asourcecolumn in newer versions. - Clearing history deletes rows. Whether the bytes survive depends on secure delete (on in Chrome and Firefox), the journal or WAL, and the file system: look in all of them, and in copies of the profile.
7 Try it yourself
Answer from the hex views and tools above.
Visit 2 has the transition 805306373. How did robin reach the search results page?
Put the number into the transition decoder in section 2.
805306373 = 0x30000005: core type 5 GENERATED (a
suggestion that was not a URL, here a search), with CHAIN_START and CHAIN_END. The search words are in
keyword_search_terms: "night train vienna". Visit 3 then has from_visit 2 and type
LINK: a result was clicked.
Which URL was deleted from the Chrome history?
Find the freeblock of the urls page in section 2.
https://quick-loans.example.net/apply, title "QuickLoans: apply in 5 minutes".
The freeblock keeps url, title, counts and last_visit_time (2026-09-14 15:52:44 UTC). The matching
visit (rowid 5, url 4) is in the freeblock of the visits page, with transition
838860801: the address was typed.
What visit_type does Firefox store for old_contacts.vcf?
Find the place ID of the .vcf URL in moz_places, then its row in
moz_historyvisits.
Place 4, visit 4: visit_type 7 = DOWNLOAD, at PRTime
1,789,496,517,901,000 = 2026-09-15 18:21:57.901 UTC.
How many bytes of JSON does the session file decompress to?
The 4 bytes after the 8-byte magic, little-endian.
B9 01 00 00 = 0x1B9 = 441 bytes, from 322 bytes of LZ4
data. Repeated keys like "entries":[{"url":"https:// compress into short back-references.
These 28 bytes are the cell of visit 7 (file offset 0xF47): payload length, rowid, record header,
then url, visit_time, from_visit, transition, …. Edit them
and watch the decoded page:
- The transition is
30 00 00 00at0xF5B. Change the last byte to01. What does the visit claim now? Check with the transition decoder. - Reset, then change the
urlvalue at0xF51from05to04. The visit now points to the deleted URL row. Why is a visit row without its URL row still worth reporting? - Reset, then change the first byte of
visit_timeat0xF52from00to01. How far into the future does the visit move?