What is the DB file format?
A .db file contains a database - usually structured, comprised of data records organized in tables along with relationships between those tables. The structure of the database stored in a .db file is defined within the same file. .db is a generic extension used by various database applications. The most common .db database file is that created by SQLite, a lightweight, serverless database engine developed by D. Richard Hipp. Every genuine SQLite .db file begins with the 16-byte header string SQLite format 3 at byte offset 0. .db files can store encrypted or access-protected databases and may alternatively use the related extensions .sqlite, .sqlite3, .s3db, or .db3.
.db database files are frequently used by mobile devices for storing data such as SMS messages or contact lists. .db files are also used by various software applications to store their data - for example, computer games. Because .db is a generic extension, not every .db file is an SQLite database; some applications write proprietary formats under the same extension. Data in a .db file can be exported into other database formats or imported from other files - for example, a CSV spreadsheet.
Security & safety
RISK: MEDIUMA SQLite .db is data, not code, so opening one in a viewer is safe - but treat the contents as sensitive: app databases often hold private messages, contacts, tokens or location history. Don't upload personal databases (e.g. WhatsApp msgstore.db) to online viewers. Be cautious only with unknown .db files from untrusted sources, and never run SQL from an untrusted source against your database.
Format details
in a nutshell- Windows Thumbs.db - A hidden OLE-compound thumbnail cache (signature D0 CF 11 E0) Windows writes in image folders; safe to delete.
- Legacy desktop databases (dBASE / Paradox) - 1980s-90s xBase/Paradox table files reused .db; opened via import in Access or LibreOffice Base.
- Proprietary application stores - Some games and e-mail clients write .db in their own undocumented binary layout readable only by that program.
Programs that open DB files
Technical details
deep spec| Format type | Binary single-file relational database (SQLite 3) |
| MIME type | application/vnd.sqlite3 |
| File header size | 100 bytes at offset 0 |
| Magic string | "SQLite format 3" plus null byte - 16 bytes at file offset 0 |
| Default page size | 4 096 bytes (configurable from 512 to 65 536 bytes, must be a power of two) |
| Text encoding | UTF-8, UTF-16-LE, or UTF-16-BE (chosen at creation, recorded in header at offset 56) |
| Data types | NULL, INTEGER, REAL, TEXT, BLOB (with type-affinity system) |
| Journaling modes | DELETE (rollback journal), WAL (write-ahead log), MEMORY, OFF |
| ACID compliance | Full atomicity, consistency, isolation, durability |
| Maximum database size | ~281 TB (theoretical maximum with 65 536-byte page size) |
| Maximum columns per table | 2 000 (default compile-time limit) |
| Related extensions | .sqlite, .sqlite3, .db3, .s3db |
| Cross-platform portability | Byte-order independent; same file runs unchanged on any OS and CPU architecture |
| Released | SQLite 3 file format, 2004 |
| Open standard | Yes · royalty-free |
| Specification | www.sqlite.org |
DB conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about DB files.