.DB

DB File

SQLite Database File
Ask a question
QUICK ANSWER

A .db file is almost always a SQLite database - the single-file format used by Android apps, browsers, and desktop programs to store their data. Open it with the free DB Browser for SQLite (Windows/macOS/Linux) or with the sqlite3 command line. If the file starts with anything other than "SQLite format 3" it is not a SQLite database; it could be a Windows Thumbs.db cache or a proprietary app format instead.

Developer: SQLite (D. Richard Hipp / SQLite Consortium) Category: Database Files Open standard MIME: application/vnd.sqlite3
OPENS ON Windows macOS Linux Web
Related: .DBF · .ACCDB · .SQL · .MDB

On this page

19k+ extensions indexed
Last reviewed Aug 1, 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 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: MEDIUM

A 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
FULL NAMESQLite Database File
DEVELOPERSQLite (D. Richard Hipp / SQLite Consortium)since SQLite 3 file format, 2004
MIME TYPEapplication/vnd.sqlite3
TYPEBinary single-file SQLite 3 database
STANDARDOpen · royalty-free
This extension is also used by…
  • 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.
MAGIC BYTES · FILE SIGNATURE
OFFSET
000102030405060708090a0b0c0d0e0f
HEX
53514C69746520666F726D6174203300
ASCII
SQLite format 3·
A SQLite database always begins with the 16-byte header string "SQLite format 3\000". A .db that starts with anything else is not SQLite - see also_used_by for the other formats that reuse this extension.

Programs that open DB files

Windows2 apps
DB Browser for SQLite Open-source File → Open Database, pick the .db, then Browse Data to view tables (works for any unencrypted SQLite database, e.g. msgstore.db).
SQLite (sqlite3 CLI) Open-source Run 'sqlite3 file.db' then '.tables' and SQL queries to inspect/export the database.
macOS2 apps
DB Browser for SQLite Open-source Open the .db and browse/edit tables; the standard cross-platform SQLite viewer.
SQLite (sqlite3 CLI) Open-source Pre-installed on macOS - 'sqlite3 file.db' then '.tables' to inspect.
Linux2 apps
DB Browser for SQLite Open-source Open the .db visually, or use the bundled sqlitebrowser package from your distro.
SQLite (sqlite3 CLI) Open-source 'sqlite3 file.db' - query and .dump to export; usually pre-installed.
Web1 app
SQLite Viewer (sqliteviewer.app) Free Drag a .db into the browser to inspect tables locally (don't upload confidential databases).

Technical details

deep spec
Format typeBinary single-file relational database (SQLite 3)
MIME typeapplication/vnd.sqlite3
File header size100 bytes at offset 0
Magic string"SQLite format 3" plus null byte - 16 bytes at file offset 0
Default page size4 096 bytes (configurable from 512 to 65 536 bytes, must be a power of two)
Text encodingUTF-8, UTF-16-LE, or UTF-16-BE (chosen at creation, recorded in header at offset 56)
Data typesNULL, INTEGER, REAL, TEXT, BLOB (with type-affinity system)
Journaling modesDELETE (rollback journal), WAL (write-ahead log), MEMORY, OFF
ACID complianceFull atomicity, consistency, isolation, durability
Maximum database size~281 TB (theoretical maximum with 65 536-byte page size)
Maximum columns per table2 000 (default compile-time limit)
Related extensions.sqlite, .sqlite3, .db3, .s3db
Cross-platform portabilityByte-order independent; same file runs unchanged on any OS and CPU architecture
ReleasedSQLite 3 file format, 2004
Open standardYes · royalty-free
Specificationwww.sqlite.org

DB conversions

Community Q&A

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

Frequently asked questions

How do I open a SQLite .db file?
Use the free DB Browser for SQLite (Windows/macOS/Linux): File → Open Database, then Browse Data to see the tables. The sqlite3 command line works too ('sqlite3 file.db', then '.tables').
How do I read a WhatsApp msgstore.db file?
If it's the plain msgstore.db, open it in DB Browser for SQLite and look at the message tables. Backups from the phone are usually encrypted (msgstore.db.crypt14/15) and must be decrypted with your account key first.
Can I convert a .db file to CSV or Excel?
Yes - open the SQLite .db in DB Browser for SQLite and export each table to CSV, then open in Excel/LibreOffice. There's no single-file binary-to-XLSX conversion; you go via CSV.
How can I tell if my .db is really a SQLite database?
Check the first 16 bytes in a hex editor: 'SQLite format 3' means SQLite (use DB Browser). If it starts with 'D0 CF 11 E0' it's an OLE file like Thumbs.db, and anything else is likely a private app format.
Why won't my .db open in DB Browser?
It may not be SQLite - it could be an encrypted backup (crypt14), a Windows Thumbs.db, or a proprietary app format. Confirm the header; SQLite files start with 'SQLite format 3'.
Can I edit a SQLite .db and save it back?
Yes - DB Browser for SQLite lets you edit rows and Write Changes, and sqlite3 runs UPDATE/INSERT SQL. Back the file up first, and close the owning app so it isn't writing at the same time.

References

1SQLite - Database File Formatwww.sqlite.org
2DB Browser for SQLite (official site)sqlitebrowser.org

Keep exploring

across the database

Top extensions this week

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

Related extensions

.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
.SQLITESQLite 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