BrowsersIntermediateCookies

Firefox cookies.sqlite

Firefox cookie store moz_cookies: host, name, path, origin attributes, flags, expiry in ms and creation, last access and update times in µs.

01Location

  • <Firefox profile>/cookies.sqlite

02Questions it answers

  • Which hosts stored cookies in this profile?
  • When was a cookie created, last accessed and last updated?
  • Was a cookie stored under particular origin attributes (for example a partitioned context)?

03Format and versions

FormatSQLite 3 database, table moz_cookies, schema version 17 in current source. Mixed units: expiry in milliseconds, other times in microseconds since 1970-01-01 UTC.
Applies toSchema 16 converted expiry from seconds to milliseconds; schema 17 added updateTime. Older profiles hold expiry in seconds.

04Key fields

FieldWhat it tells you
host, name, value, pathCookie identity and value.
originAttributesSerialised origin attributes; part of the unique key with name, host and path.
isSecure, isHttpOnly, sameSite, schemeMap, isPartitionedAttributeSet, inBrowserElementAttribute flags as stored by Firefox.

05Timestamps

FieldEncodingNote
expiryint64 ms since 1970-01-01 UTC (schema ≥ 16); seconds in older schemasCheck PRAGMA user_version before converting.
creationTimeint64 µs since 1970-01-01 UTCMade unique per cookie; Firefox may advance it by 1 µs to avoid collisions.
lastAccessedint64 µs since 1970-01-01 UTCLast access as tracked by the cookie service.
updateTimeint64 µs since 1970-01-01 UTCFor cookies migrated into schema 17 this was set to the migration time, not the real update time.

Decode raw values with the Timestamp decoder and convert local wall-clock times with the Local time to UTC.

06Examination workflow

  1. Copy cookies.sqlite with any -wal file and read PRAGMA user_version.
  2. Convert expiry with the unit that matches the schema and the other times as microseconds.
  3. Look for clusters of identical updateTime values that indicate a schema migration rather than user activity.
  4. Correlate creationTime with places.sqlite visits to the same host.

07Interpretation pitfalls

  • Three units coexist in one table (ms, µs and, in old files, seconds); verify each column before conversion.
  • The last microsecond digits of creationTime can be adjusted for uniqueness and are not a precise event time.
  • Third-party resources can set cookies for hosts the user never visited directly.

09Sources

  1. Firefox source — netwerk/cookie/CookiePersistentStorage.cpp Mozilla (GitHub mirror) · checked 2026-10-14
  2. Firefox source — netwerk/cookie/Cookie.h Mozilla (GitHub mirror) · checked 2026-10-14
  3. Firefox source — netwerk/cookie/Cookie.cpp Mozilla (GitHub mirror) · checked 2026-10-14
  4. Profiles — Where Firefox stores your bookmarks, passwords and other user data Mozilla Support · checked 2026-10-14