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.
How to open 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
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 file signature (magic bytes)
Programs recognise a .db file by the bytes at the start of the file, not by its name. These are the signatures for DB. For a full breakdown, see the DB file signature page.
| Hex signature | Offset | Note |
|---|---|---|
| (no fixed signature) | 0 | no fixed signature; .db is generic, though many are SQLite databases beginning 'SQLite format 3' |
See the full magic-numbers reference for every format.
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: