.DB-WAL

DB-WAL File

SQLite Write-Ahead Log
Ask a question
QUICK ANSWER

A .db-wal file is a SQLite Write-Ahead Log - a temporary sidecar that holds the newest committed changes for a SQLite database before they are written back into the main .db file. To read it, open the main database in DB Browser for SQLite and keep the .db-wal in the same folder; SQLite reads them together automatically. The main concern is deletion: removing a .db-wal while the database is in use, or after a crash, discards recent data.

Developer: D. Richard Hipp / SQLite Development Team (public domain) Category: Database Files Open standard MIME: application/octet-stream
OPENS ON Windows macOS Linux
Related: .DB · .DBF · .ACCDB · .SQL

On this page

19k+ extensions indexed
Last reviewed Jul 25, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the DB-WAL file format?

.db-wal files are used by the SQLite database engine (since version 3.7.0, released July 2010) in WAL (Write-Ahead Logging) journaling mode.

Contents of DB-WAL files

Files with the .db-wal extension contain write-ahead log data for a paired SQLite database. Such files are created and used while a database is open and actively modified. A .db-wal file stores committed database changes - complete database pages - that have not yet been written ("checkpointed") back into the main .db file. This write-ahead approach is faster than directly modifying database pages in place, and ensures durability: in the event of a sudden power outage or system crash, SQLite can replay the WAL to recover all committed transactions.

Each .db-wal file begins with a 32-byte header containing a 4-byte magic number (0x377f0682 for little-endian checksums, 0x377f0683 for big-endian), salt values, and a cumulative checksum. The body consists of frames: a 24-byte frame header plus one full database page each. Salt values in the header invalidate stale frames after a checkpoint, preventing accidental replays.

Using DB-WAL files

.db-wal log management is fully automated by the SQLite engine. A companion .db-shm file (shared-memory index) is always present alongside the WAL while the database is open. The .db-wal file disappears automatically once all changes are checkpointed - the default wal_autocheckpoint threshold is 1000 pages. The underlying WAL mechanism is widely used on mobile devices; databases on Android and iOS apps frequently operate in WAL mode for improved concurrency and write performance.

Security & safety

RISK: LOW

A .db-wal is inert data, not executable code, so it cannot run by itself. The real risks are operational, not malware: (1) deleting or losing the -wal while the database is open, or after a crash, discards the newest committed transactions - back up the -db, -wal and -shm together; (2) the WAL of an app database can hold sensitive, not-yet-checkpointed data (messages, tokens, history), so treat it as confidential. If the parent database is encrypted (SQLCipher/SEE), the -wal is encrypted too.

Format details

in a nutshell
FULL NAMESQLite Write-Ahead Logaka WAL file, SQLite WAL
DEVELOPERD. Richard Hipp / SQLite Development Team (public domain)since SQLite 3.7.0, July 2010 (WAL journaling mode)
MIME TYPEapplication/octet-stream
TYPEBinary write-ahead log sidecar for a SQLite 3 database (transaction journal)
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
377F0682
ASCII
7···
The 32-byte WAL header begins with a 4-byte magic number: 0x377f0682 if the file uses native little-endian checksums, 0x377f0683 for big-endian. This is NOT the "SQLite format 3" header of the main database - the -wal file is a separate journal, not a database. The filename is always the database name with "-wal" appended (e.g. mydata.db-wal).

Programs that open DB-WAL files

Windows2 apps
DB Browser for SQLite Open-source Use 'Write Changes' / 'Checkpoint' so the -wal is merged before you copy or back up the database.
SQLite (sqlite3 CLI) Open-source Run 'sqlite3 mydata.db' with the -wal alongside it; a checkpoint ('PRAGMA wal_checkpoint(TRUNCATE);') folds the log into the main database.
macOS2 apps
DB Browser for SQLite Open-source Open the main .db/.sqlite; macOS apps (Mail, Photos, Messages) use WAL, so keep the -wal beside the database to see current data.
SQLite (sqlite3 CLI) Open-source Pre-installed on macOS - 'sqlite3 file.db' reads the -wal transparently; '.tables' and queries show the live data.
Linux2 apps
SQLite (sqlite3 CLI) Open-source 'sqlite3 file.db' with the -wal present; usually pre-installed. Run a checkpoint before archiving the database.
DB Browser for SQLite Open-source Install the sqlitebrowser package and open the main database; the -wal is applied automatically.

Technical details

deep spec
Magic bytes0x377f0682 at offset 0 (little-endian checksums) or 0x377f0683 (big-endian checksums)
Header size32 bytes containing magic, file-format version, page size, checkpoint sequence, salt pair, and checksum
Frame structure24-byte frame header + one full database page per frame
Page sizeMatches the page size of the parent SQLite database (typically 4096 bytes)
ChecksumCumulative 8-byte checksum (two 32-bit words) in each frame header and in the WAL header
Salt invalidationTwo 32-bit salt values are randomized after each checkpoint, invalidating any stale frames
Companion fileAlways paired with a .db-shm (shared-memory index) file while the database is open
Naming conventionDatabase filename with -wal appended (e.g., mydata.db-wal)
ActivationCreated only when the database is set to WAL mode (PRAGMA journal_mode=WAL)
Auto-checkpointDefault wal_autocheckpoint at 1000 pages limits maximum WAL growth before checkpointing
Format version fieldWAL header encodes the SQLite library version as 3007000 (SQLite 3.7.0, July 2010)
EncryptionNone by default; encrypted when the database uses SEE or SQLCipher extension
ReleasedSQLite 3.7.0, July 2010 (WAL journaling mode)
Latest versionWAL file format magic 0x377f0682 (little-endian) / 0x377f0683 (big-endian)
Open standardYes · royalty-free
Specificationwww.sqlite.org

DB-WAL conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DB-WAL files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about DB-WAL files.

Frequently asked questions

What is a .db-wal file and can I delete it?
It's a SQLite Write-Ahead Log holding the database's newest committed changes. If the database is closed cleanly the -wal has been checkpointed and deleting it is safe; if an app is using the database or it crashed, deleting the -wal can lose recent data. When in doubt, leave it.
How do I open a .db-wal file?
You don't open it on its own - open the main database (the .db/.sqlite next to it) in DB Browser for SQLite or with the sqlite3 tool, keeping the -wal in the same folder. SQLite reads the log automatically and shows the current data.
Why is the newest data missing after I copied a SQLite database?
You probably copied only the .db and not the -wal (and -shm). The latest committed changes live in the -wal until a checkpoint. Either copy all three files together, or run a checkpoint first so everything is in the single .db.
What's the difference between .db-wal and .db-shm?
The -wal is the actual write-ahead log of changed pages. The -shm is a small shared-memory index that helps multiple connections find the latest version of each page in the -wal. Both are temporary sidecars to the main database.
Is .db-wal an Android-only file?
No. The database name in our catalog mentions Android because many Android apps use SQLite, but WAL is a generic SQLite feature used on iOS, Windows, macOS and Linux too - browsers, Mail, Photos, and countless apps create -wal files.
How do I merge a .db-wal back into the database?
Open the database and run 'PRAGMA wal_checkpoint(TRUNCATE);' in the sqlite3 shell or DB Browser, or simply close the database cleanly. SQLite writes the logged pages into the main file and empties the -wal.

References

1SQLite - Write-Ahead Logging (WAL)www.sqlite.org
2SQLite - WAL File Formatwww.sqlite.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.BCBitComet Incomplete Download File
3.PARTPartial Download File
4.CRDOWNLOADChrome Partial Download File
5.BINCD/DVD Disc Image (BIN/CUE)
6.MDMarkdown Document
7.EXEWindows Executable (Portable Executable)
8.RPMSGRestricted Permission Message
9.AVIFAV1 Image File Format (AVIF)
10.NOMEDIAAndroid No-Media Marker File

Related extensions

.DBSQLite Database File
.DBFDatabase File (dBASE / xBase table)
.ACCDBMicrosoft Access Database (2007+)
.SQLSQL Script (Structured Query Language source / database dump)
.MDBMicrosoft Access Database (97-2003, Jet engine)
.FDBFirebird Database

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z