Skip to content

.DB file extension

To open .DB files on Windows, determine whether it is an SQLite database: if you have a SQLite-capable tool, try opening the file directly; if it fails, the .db extension may not be SQLite in this case.

To open a .db file, try opening it as an SQLite database using SQLite-compatible tools (for example, the sqlite3 command-line shell or a SQLite database browser). If it doesn’t open, the .db extension may be used by something else, but it is very commonly a SQLite 3 database.

Last updated: June 12, 2026

Open on your device

Choose your operating system for a dedicated step-by-step opening guide.

How to open .DB files

Use these platform-specific instructions to open .DB files safely.

Windows

  1. Determine whether it is an SQLite database: if you have a SQLite-capable tool, try opening the file directly; if it fails, the .db extension may not be SQLite in this case.
  2. Open it with an SQLite tool such as the sqlite3 command-line program (from SQLite) or a SQLite database browser, then inspect tables and run queries.
Full Windows guide

Mac

  1. Try opening the .db file with an SQLite-capable tool (for example, the sqlite3 command-line shell) rather than double-clicking in Finder.
  2. If you need a graphical view, use a SQLite database browser and open the file to view tables and run SQL queries.
Full Mac guide

Linux

  1. Use file identification rather than extension alone: many desktop environments use shared-mime-info rules based on filename and file “magic”.
  2. Open it with SQLite tooling (e.g., the sqlite3 command-line shell) or a SQLite database browser to inspect schema and query data.
Full Linux guide

iOS

  1. .db files are not typically “opened” directly in iOS; transfer the file to a desktop and use SQLite tools (e.g., sqlite3 or a SQLite database browser) to view or export the contents.
Full iOS guide

Android

  1. .db files are commonly used by apps internally; to inspect one, copy it to a desktop and open it with SQLite tools (e.g., sqlite3 or a SQLite database browser).
Full Android guide

Security notes

  • A .db file itself is data, but opening untrusted SQLite databases still carries risk: database tools and libraries must parse complex binary structures, so use well-maintained SQLite tooling when handling files from unknown sources.
  • Because “.db” is ambiguous, do not assume it is SQLite (or safe) based on the extension; identify by file signature/magic where possible and only open with software appropriate to the detected type.
  • Be cautious with SQL content inside an untrusted database if you plan to run queries or export data into other systems; treat the data as untrusted input.

Can't open this file?

These are the most common causes and fixes when .DB files fail to open.

Common reasons

  • The .db file won’t open (wrong format for the extension)
  • “Database disk image is malformed” or similar corruption errors
  • The database is locked / can’t be edited

Fix steps

  1. Verify it’s SQLite by opening it with an SQLite-aware tool; if the tool reports it is not a database or not SQLite, treat it as an unknown database format.
  2. On Linux, rely on MIME/magic-based identification (shared-mime-info style) rather than extension alone to avoid misclassification.

What is a .DB file?

A SQLite database is a self-contained database stored in a single file, often named with the .db extension. The SQLite file format is documented by SQLite.org, and a recognized Internet Media Type for SQLite 3 databases is application/vnd.sqlite3. Identification can also be done by file “magic” (file signature) rather than relying on the ambiguous .db extension.

Background

“.db” is a very common filename extension used for SQLite 3 database files. SQLite is widely embedded into applications, so you often encounter .db files inside app data folders, backups, exports, or as part of software projects and datasets.

Common MIME types: application/vnd.sqlite3

Other meanings of .DB

The extension .DB is used by several programs. Besides the file type described on this page, it can also stand for:

  • Mobile Device Database
  • X-Ray Engine Database
  • Skype Chat and Call History
  • DuckDB database
  • QQ Account Database

Further reading

Authoritative resources for more details on the .DB format.

Common .DB issues

The .db file won’t open (wrong format for the extension)

The .db extension is ambiguous; not every .db file is SQLite. Many systems and apps use .db as a generic “database” extension.

  1. Verify it’s SQLite by opening it with an SQLite-aware tool; if the tool reports it is not a database or not SQLite, treat it as an unknown database format.
  2. On Linux, rely on MIME/magic-based identification (shared-mime-info style) rather than extension alone to avoid misclassification.

“Database disk image is malformed” or similar corruption errors

SQLite tools may report corruption if the file was truncated, partially copied, or otherwise damaged.

  1. Re-copy the file from the original source to avoid partial transfers.
  2. If you control how it was created, ensure it is produced/closed cleanly before copying; then try opening again with SQLite tools.

The database is locked / can’t be edited

SQLite databases may be locked when another process/app is actively using the file, or if you are working from a read-only location.

  1. Close the application that may be using the database and try again.
  2. Copy the .db file to a writable folder you own, then open the copy with your SQLite tool.

FAQ

Is a .db file always an SQLite database?

No. “.db” is a common extension for SQLite databases, but it is also used generically for other database formats. If SQLite tools can’t read it, it may not be SQLite.

What MIME type is associated with SQLite database files?

A recognized Internet Media Type for SQLite 3 databases is application/vnd.sqlite3.

Why doesn’t double-clicking open my .db file?

Operating systems often don’t associate .db with a specific viewer, and the extension is ambiguous. Use an SQLite tool (like the sqlite3 shell or a SQLite database browser) and open the file from within that tool.

How can I confirm it’s really SQLite without trusting the extension?

Use tools or desktop mechanisms that identify files by “magic” (signature) rather than only by extension; this approach is described in the shared-mime-info specification and is used by many Linux desktops.

Similar file extensions

Compare related formats in the same category to find the right tool faster.

Did this guide help?