What a SQLite rollback journal contains
Before changing a database page in rollback-journal mode, SQLite can store that page’s original contents in a journal. A valid header records a checksum nonce, the database’s initial page count, sector size, and page size. Each following record contains a big-endian page number, one original page, and a sparse checksum. Additional headers may occur at sector-aligned boundaries.
What this inspector checks
The inspector verifies the eight-byte journal magic, supported page and sector sizes, header alignment and padding, declared record bounds, page-number range, SQLite’s nonce-seeded sparse checksum, duplicate pages, and incomplete or unexplained tails. An optional database adds its 100-byte header, mode and page-size checks plus exact page-byte comparison. Search, filters, pagination, copy, print, and formula-safe CSV keep large journals reviewable.
Why this cannot declare a journal hot
A valid-looking journal is not automatically a hot journal. SQLite’s decision also depends on the corresponding database and locking state, and committed journals can be deleted, truncated, or invalidated by overwriting the header. An all-zero header can therefore be intentional in persistent-journal mode. Inspect stable copies and let SQLite—not a browser tool—perform recovery.
Validation boundary
This is a bounded structural preflight, not recovery, PRAGMA integrity_check, or forensic certification. It does not decode B-trees, schemas, rows, freelists, overflow pages, or super-journal semantics; determine locks or transaction state; prove file pairing, hotness, authenticity, or legal provenance; replay, repair, or extract pages; or replace SQLite’s own recovery and backup facilities. Non-zero tail bytes are reported without guessing whether they are stale allocation, an incomplete write, or a super-journal pointer.
Frequently asked questions
Does “different from database” mean corruption?
No. A rollback journal exists precisely because pages may be changed in the database after their original versions were recorded. It can also be a stale or mismatched file. The comparison is evidence, not a verdict.
Why is the checksum sparse?
SQLite seeds the checksum with the header nonce and samples one byte every 200 bytes working backward from page-size minus 200. This tool follows that documented algorithm exactly; it is not a cryptographic digest.
Can I delete a journal after it passes?
No. A journal may be required for recovery. Open or back up the database through SQLite and let the library manage journal lifecycle.
Authoritative reference
SQLite’s official database file-format documentation defines rollback-journal headers, page records, checksums, segment alignment, and invalidation behavior.
Inspect a SQLite WAL · Inspect a SQLite SHM wal-index · Browse legacy-data tools