.DB-JOURNAL

DB-JOURNAL File

SQLite Rollback Journal
Ask a question
QUICK ANSWER

A .db-journal file is a SQLite Rollback Journal - a temporary crash-recovery sidecar SQLite creates next to a database during a write transaction and deletes the moment that transaction commits. You see it only when an app crashed mid-transaction and left it behind. Do not delete it while any app is running. To recover, open the main .db file in DB Browser for SQLite; SQLite reads the journal, rolls back the incomplete transaction automatically, and removes the file.

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 11, 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-JOURNAL file format?

Files with the extension .db-journal contain the page images necessary for the recovery of a SQLite database in case of a transaction failure. These are temporary files created by SQLite in the same directory where the database is stored. They should not be visible after the transaction has concluded, as SQLite deletes them automatically on COMMIT or ROLLBACK.

Thanks to the transaction rollback journal files with the extension .db-journal, it is possible to ensure the atomicity of transactions in the database. An application operating on database data that crashes mid-transaction will not leave operations incomplete - they will be reverted to the state before the transaction began. A .db-journal file is present on disk:

  • during the execution of a write transaction (DELETE journal mode, SQLite's default),
  • when a transaction was interrupted by a crash - until the next connection opens the database,
  • when the database is in exclusive locking mode (PRAGMA locking_mode=EXCLUSIVE) - until it is turned off.

SQLite may use several different temporary sidecar files to ensure the coherence and security of database operations. .db-journal is the classic rollback journal; .db-wal and .db-shm serve the equivalent role in the newer WAL (Write-Ahead Log) mode.

.db-journal file naming

The journal file is named by appending -journal to the full database filename. For instance, if the database is saved as baza.db, the temporary file will be named baza.db-journal and stored in the same directory. Temporary files are not normally visible to users. In case of a crash or power failure, the journal remains in the directory until the next time the database is opened - SQLite then detects the "hot journal," replays the saved page images to restore the pre-transaction state, and deletes the journal automatically.

You should never delete a .db-journal file while a write transaction is in progress, as doing so will corrupt the database. A persistent .db-journal after a clean shutdown almost always indicates a prior crash; SQLite handles the recovery safely on the next open. In WAL mode (PRAGMA journal_mode=WAL), introduced in SQLite 3.7.0 (July 2010), the .db-journal file is not used at all - a .db-wal file takes its role. Most modern application databases have switched to WAL mode for improved read concurrency.

Security & safety

RISK: LOW

Not executable; binary crash-recovery data. Deleting a -journal while the database is being written to will corrupt the database - the main operational risk. Leftover journals from crashes are safe to leave until SQLite auto-recovers them. A -journal may contain sensitive un-committed data from the interrupted transaction (partial writes of messages, credentials, etc.); treat with same confidentiality as the main database. Do not open or distribute a -journal in isolation without the parent database.

Format details

in a nutshell
FULL NAMESQLite Rollback Journalaka SQLite journal, rollback journal
DEVELOPERD. Richard Hipp / SQLite Development Team (public domain)since SQLite 1.0, 2000 (rollback journal is the original journaling mechanism)
MIME TYPEapplication/octet-stream
TYPEBinary (or plain-text "hot journal" stub) temporary transaction journal sidecar for a SQLite 3 database
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001020304050607
HEX
D9D505F920A163D7
ASCII
···· ·c·
A hot (persistent) rollback journal begins with the 8-byte magic number 0xD9D505F9 20A163D7. A temporary/transient journal may start with a zeroed header or a "hot journal" plain-text stub (just the string "-journal") depending on the SQLite version and OS. The filename is always the main database path with "-journal" appended (e.g. mydata.db-journal).

Programs that open DB-JOURNAL files

Windows3 apps
DB Browser for SQLite Open-source Open the MAIN database (the .db/.sqlite file) - SQLite handles the -journal automatically. Do not open the -journal directly.
SQLite (sqlite3 CLI) Open-source Run 'sqlite3 mydata.db'; if a hot journal exists SQLite rolls it back automatically on connection, then removes the journal.
Notepad++ (text editor - inspection only) Open-source Can display the binary journal content for forensic inspection; the 8-byte magic header is visible at offset 0. Do not edit.
macOS2 apps
DB Browser for SQLite Open-source Open the main database; the -journal is consumed automatically during the first open after a crash.
SQLite (sqlite3 CLI) Open-source Pre-installed on macOS; 'sqlite3 file.db' triggers automatic journal rollback if a hot journal is found.
Linux2 apps
SQLite (sqlite3 CLI) Open-source 'sqlite3 file.db' - rollback journal is automatically replayed and deleted on first open. Usually pre-installed.
DB Browser for SQLite Open-source Install the sqlitebrowser package; open the main database, keep the -journal in the same directory.

Technical details

deep spec
Format typeBinary temporary transaction rollback journal (SQLite sidecar file)
Magic bytes8-byte header: 0xD9 0xD5 0x05 0xF9 0x20 0xA1 0x63 0xD7 (hot/persistent journal)
Byte orderBig-endian (journal header fields stored in network byte order)
Journal header size28 bytes (page count, random nonce, sector size, page size fields)
EncodingBinary - stores verbatim SQLite 3 database page images copied before modification
Per-page checksumTwo 32-bit integers computed from the nonce and page data; mismatch signals a stale or incomplete journal
Typical file size0 bytes to hundreds of MB depending on how many pages the aborted transaction touched
Journal modeUsed only in DELETE journal mode (SQLite's default); not created in WAL mode
Naming conventionMain database path with -journal appended (e.g., mydata.db → mydata.db-journal)
Recovery mechanismSQLite detects a hot journal on connection open, replays page images to restore pre-transaction state, then deletes the journal
WAL supersessionWAL mode (.db-wal + .db-shm), introduced in SQLite 3.7.0 (July 2010), is preferred for concurrent workloads and does not use the .db-journal file
ReleasedSQLite 1.0, 2000 (rollback journal is the original journaling mechanism)
Latest versionSQLite 3.x current - format unchanged since early SQLite 3; superseded in practice by WAL (-wal)
Open standardYes · royalty-free
Specificationwww.sqlite.org

DB-JOURNAL conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DB-JOURNAL 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-JOURNAL files.

Frequently asked questions

What is a .db-journal file?
A SQLite Rollback Journal - a temporary binary file SQLite creates during a write transaction to store the original page content before changes. It is deleted automatically at COMMIT. If it persists after an app crash, SQLite uses it to roll back the incomplete transaction on the next database open.
Can I delete a .db-journal file?
Only if the parent app is not running AND the database is not in the middle of a transaction. If an app crashed and left a -journal behind, leave it - SQLite will automatically replay and delete it on the next open. If the app is running and you delete the -journal you may corrupt the database.
How do I open or read a .db-journal file?
You don't open it directly. Open the parent database (the .db/.sqlite file) in DB Browser for SQLite or with the sqlite3 CLI; SQLite handles the journal automatically. If you need forensic inspection, Notepad++ can display the binary content.
My database is corrupted - there's a -journal file. What do I do?
Open the MAIN database with any SQLite tool (DB Browser for SQLite, sqlite3 CLI) while keeping the -journal in the same folder. SQLite will detect the hot journal, roll back the incomplete transaction, and delete the journal. This usually restores the database.
What is the difference between .db-journal and .db-wal?
Both are SQLite transaction journals. The -journal (rollback journal) is the original mechanism (SQLite default): it stores page copies BEFORE changes, is deleted on commit. The -wal (Write-Ahead Log) is newer (SQLite 3.7.0, 2010): it stores page copies AFTER changes and is merged back at checkpoint. WAL is faster for concurrent reads but requires both -wal and -shm sidecars.
Is .db-journal an Android-only thing?
No - it appears on any platform running SQLite in the default DELETE journal mode. Android apps, iOS apps, desktop programs, and browsers all use SQLite and can produce -journal files.
Why do I have a .db-journal when the app never crashed?
Sometimes apps don't close the database cleanly (e.g. force-stop, OS kill). The -journal is identical in effect to a crash journal; SQLite rolls it back on the next open.

References

1SQLite - Temporary Files Used By SQLitewww.sqlite.org
2SQLite - Atomic Commit in SQLitewww.sqlite.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.DATProgram Data File (generic)
4.JPGJPEG Image
5.RPMSGRestricted Permission Message
6.EXEWindows Executable (Portable Executable)
7.PARTPartial Download File
8.ICSiCalendar data file
9.JSONJavaScript Object Notation file
10.BINCD/DVD Disc Image (BIN/CUE)

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