What is a .db file?
Database File · Data · Various · n/a
DB is a generic label for a database file, so a .db could be anything from a SQLite database to a program's private data store. The most common kind by far is SQLite, but what opens it depends on the app that created it.
What is a .db file used for?
The .db extension only promises that the file holds a database of some sort. It carries no guarantee of format, so two .db files from two programs can be completely different.
In practice, most .db files today are SQLite databases, which open in DB Browser for SQLite. Others are app-specific: Windows thumbnail caches (Thumbs.db), mail stores, and game or program data.
The reliable way to tell what you have is to check the start of the file. If the first bytes read 'SQLite format 3', it is SQLite; otherwise it belongs to whichever program made it.
Dropping the file into the WhatFileType identifier, or opening it in a hex editor, reveals the real format hiding under the generic name.
What opens a .db file?
The .db format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- DB Browser for SQLite (if SQLite)
- the program that created it
- hex editor (to inspect)
macOS
- DB Browser for SQLite (if SQLite)
- the originating program
- hex editor
Linux
- DB Browser for SQLite (if SQLite)
- the originating program
- hex editor
Web
- Not applicable
Open a .db file step by step
- Confirm the file really is a .db. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with DB Browser for SQLite (if SQLite) or the program that created it.
- On Mac, use DB Browser for SQLite (if SQLite) or the originating program.
- On Linux, try DB Browser for SQLite (if SQLite) or the originating program.
- Still stuck? Convert the .db to Depends on the actual contents, which opens more widely.
Why can't I open my .db file?
Almost always because no installed app understands DB. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.
The other possibility is that the file is not really a .db at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.
How to convert a .db file
You can convert a .db file to Depends on the actual contents using a conversion tool or the export menu of an app that opens it.
DB has no fixed magic number, so there is no signature table on this page. Its bytes alone do not prove the format: identification relies on the extension, the structure of the content and the program that created it. The magic-numbers reference lists the formats that do carry one.
Frequently asked questions
What is a .db file?
DB is a generic label for a database file, so a .db could be anything from a SQLite database to a program's private data store. The most common kind by far is SQLite, but what opens it depends on the app that created it.
How do I open a .db file?
First find out what it is: if the file starts with 'SQLite format 3' it is a SQLite database, so open it in DB Browser for SQLite. Otherwise, open it in the program that created it, or inspect it in a hex editor.
What program opens a .db file?
There is no single answer, because .db is a generic label. The most common case is SQLite (use DB Browser for SQLite). Beyond that, the right program is whichever one produced the file.
Related formats
Sources
Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.