Deep Dive into the SQLite Database File Format
2025-09-07
This document details the on-disk database file format used by all SQLite releases since version 3.0.0. SQLite databases typically reside in a single file, the "main database file," containing the database state. Additional files, rollback journals or WAL files, aid in recovery to a consistent state. This document focuses on the main database file, covering page size and types, B-tree pages, freelists, and record format. Rollback journals and WAL file formats are also briefly described.
Development