File Extension File Extension Guide

What is a DB File?Database

A guide to the .db extension, a generic database file. What a DB file holds, why the extension does not reveal which program made it, how to work out what created yours, and how to open it safely.

Database File 🗄️ Tables and Records ❓ Generic Extension 🪶 Often SQLite
.DB

Generic Database File

Type:Database
Extension:.db
Structure:Tables, records, fields
Most Common:SQLite
Opens With:DB Browser for SQLite

🗄️ What is a DB File?

A DB file is a database file, a container that stores information in an organized structure of tables, records and fields rather than as plain flowing text. The catch, and the thing worth understanding first, is that .db is a generic label that does not say which program built the database.

Think of the extension like a box marked simply "data". It tells you there is structured information inside, arranged so a program can look things up quickly, but it does not reveal who packed the box or how they organized it. Many different pieces of software save their databases with the .db ending, from lightweight tools embedded in phone apps to older desktop programs, and each may lay out the contents in its own way. This is quite unlike an extension such as .mp3 or .pdf, where the name pins down one clear format. With .db you know the general kind of file you have, a database, without yet knowing its exact flavour.

That ambiguity shapes everything about working with a DB file. Because the extension alone will not tell you how to read it, the practical first step is usually to work out what created the file, and only then choose the right tool to open it. The good news is that the large majority of .db files you meet today are one particular kind of database called SQLite, which has well-known free tools, so once you confirm that, opening the file is usually straightforward. The rest of this guide walks through why the extension is so vague, how to identify what you actually have and how to open it safely.

Key Characteristics

  • Stores data in tables, records and fields
  • Generic extension, used by many programs
  • Most often an SQLite database
  • Not readable as plain text

Good to Know

  • Identify first, then pick the tool
  • Opens with DB Browser for SQLite
  • May be locked or encrypted by an app
  • Can export its tables to CSV
💡 Why it matters: A DB file is a database, but .db is a generic extension that does not name the program that made it. Most are SQLite databases, so the usual approach is to confirm the type first and then open it with the matching tool.

⚡ Quick Facts

File Extension.db
File TypeGeneric database file
StoresStructured data in tables
Most Common FormatSQLite
Other UsersMicrosoft Access, mobile apps, games
Opens WithDB Browser for SQLite, and others
Readable As TextNo, it is a binary file
Can Export ToCSV and similar

❓ Why DB Is Ambiguous

The single most important thing to grasp about a DB file is that the extension is a category, not a format, and appreciating that saves a lot of wasted effort with the wrong tool.

When software needs to store a database, it has to save it under some file name, and .db is a natural, honest choice that simply means database. Nothing stops many unrelated programs from all reaching for that same ending, so over the years a great many have. One .db might be a compact database quietly powering a phone app, another might hold the settings and history of a desktop program, and a third might be an old proprietary format from software that is barely remembered. They share an extension but almost nothing else, which is why double-clicking a .db rarely just works, since your computer often has no single default program that understands every possible kind. This is the same situation as a plain .dat file, another deliberately vague ending. The lesson is not to assume two DB files are related just because they look alike from the outside, and to treat the extension as a hint about the kind of content rather than a promise about the format.

.db is generic: identify the format first, then pick the tool a .db file format unknown Identify it signature + name and location SQLite? (most common) DB Browser for SQLite Another database? use its matching program # open the file and read the first bytes as text: SQLite format 3 ← this confirms an SQLite database

🪶 DB and SQLite

Although .db can mean many things, one format sits far above the rest in how often it turns up, and knowing it is the reason most DB files are easier to handle than their vagueness suggests.

That format is SQLite, a small, self-contained database engine that packs an entire database into a single ordinary file. It is enormously popular precisely because it needs no separate server to run, which makes it ideal for storing data inside applications, and it is built into web browsers, phones and countless programs on every major operating system. When an app on your computer or phone keeps a database, there is a strong chance it is an SQLite one saved with a .db name. This matters because SQLite files are a known quantity with excellent free tools for reading them, so confirming that your DB file is SQLite usually turns a mystery box into something you can open in a couple of minutes. Developers sometimes give SQLite databases other endings too, such as .sqlite or even .dat, but .db is among the most common, and SQLite is the first format to suspect when you meet one.

✅ In short: Most DB files are SQLite databases, an entire database held in one self-contained file. Because SQLite has well-supported free tools, identifying a DB file as SQLite is usually the key to opening it quickly.

🔍 How to Identify Your DB File

Before opening a DB file it pays to work out what created it, and there are a couple of reliable detective tricks that quickly narrow things down.

The most dependable method is to peek at the very start of the file, where most formats leave a small signature, known as a magic number. If you open the DB file in a plain text editor or a hex editor and the first line begins with the readable words SQLite format 3, you have your answer, since that marker confirms an SQLite database. The other strong clue is context, meaning where the file came from and what it is called. A DB file sitting in a messaging app's folder is very likely that app's chat database, a file named thumbs.db in a Windows picture folder is a thumbnail cache, and a file called sms.db from a phone backup holds text messages. The file name and location together often reveal the program responsible even before you open anything. Putting the two together, a quick look at the opening bytes plus a moment's thought about where the file lives will usually tell you the format, and from there the right tool follows naturally.

The signature at the start of an SQLite DB file

# first bytes of the file, shown as text
SQLite format 3\0
# if you see this, it is an SQLite database

# other clues come from the name and location:
thumbs.db   Windows thumbnail cache
sms.db      iOS text message store
chat.db     a messaging app database

📂 How to Open a DB File

Once you know what a DB file is, opening it comes down to matching it with a program that understands its format, and for the common case that program is easy to find.

Since most DB files are SQLite databases, the go-to tool is DB Browser for SQLite, a no-cost app that runs on Windows, macOS and Linux and opens an SQLite .db file and shows its tables and records in a familiar grid you can browse and search. Developers often use the built-in sqlite3 command-line tool instead, and there are online SQLite viewers that let you upload a file and inspect it in the browser without installing anything. If your DB file turns out to be a Microsoft Access database rather than SQLite, then Access itself, or a compatible viewer, is the program to reach for. The important habit is to identify the format first, as covered above, because pointing the wrong program at a DB file will simply fail to make sense of it. One more caution is worth repeating, that many DB files created by apps, especially on phones, are locked or encrypted and are not designed to be opened by hand, so a file that refuses to open may be protected rather than broken.

🧩 Companion Files

If you have noticed extra files sitting next to a DB file with names like the database plus a suffix, they are not clutter, and understanding them prevents accidental damage.

SQLite and similar engines often create small helper files alongside the main database while it is in use, with endings such as .db-journal, .db-wal and .db-shm. These hold recent changes and notes the database uses to stay consistent and to recover cleanly if a program is interrupted, so a name like data.db-wal simply belongs to data.db. The key point is not to delete or move these helper files while the database might be open, because doing so can leave the database in a confused state or lose the most recent changes. In normal use the engine tidies them up on its own. If you are copying a database to back it up or move it, the safest approach is to copy the main .db file together with any of these companions present, so the complete, up-to-date picture travels with it. Left alone, they quietly do their job and need no attention.

📊 How to Convert a DB File to CSV or Excel

A common goal with a DB file is to get its data into a spreadsheet, and while you cannot open a database directly in Excel, moving the data across through CSV is quick once you know the steps.

The friendliest route uses DB Browser for SQLite. After opening your .db file in it, you go to the File menu, choose Export, then Table to CSV, pick the table you want and a place to save it, and the program writes out a CSV file that Excel opens straight away. If you would rather work at the command line, the sqlite3 tool does the same job with a few short commands, setting the output to CSV, turning on column headers and pointing it at an output file before running a query. Because a database can hold several tables, you export them one at a time, each becoming its own CSV. Once you have the CSV, opening it in Excel gives you the familiar rows and columns, and if you specifically want an Excel workbook you can then use Save As in Excel to store it as an .xlsx file. The two approaches are shown below.

Two ways to export a table to CSV

# A. In DB Browser for SQLite (no coding):
FileExportTable(s) to CSV → pick table → Save

# B. With the sqlite3 command-line tool:
sqlite3 mydata.db
.mode csv
.headers on
.output people.csv
SELECT * FROM people;
.quit
# people.csv now opens directly in Excel

🏷️ .db vs .sqlite vs .sqlite3

If you have seen database files ending in .db, .sqlite and .sqlite3 and wondered how they differ, the short answer is reassuring, since for SQLite databases they are usually the very same thing.

SQLite does not require any particular file extension, so developers are free to name their databases however they like, and over time three endings became popular by convention. Some choose .db because it plainly says database, others prefer .sqlite or .sqlite3 to make the format obvious at a glance, with the 3 referring to the current major version of SQLite. None of these choices changes what is inside, so a file's real format is decided by its contents, not its name, which is exactly why the signature check matters more than the extension. Database tools reflect this by happily accepting all of them, and you will find that DB Browser for SQLite and similar programs open a .db, a .sqlite or a .sqlite3 file without any fuss. The practical takeaway is not to read too much into which of these endings a file uses, since they are interchangeable labels for the same kind of SQLite database, and confirming the format from the file itself remains the reliable step.

Three names, one format: all are SQLite databases inside file.db file.sqlite file.sqlite3 the same SQLite database the contents decide the format, not the name
ExtensionWhat it usually meansFormat
.dbGeneric database, often SQLiteSame SQLite format
.sqliteExplicitly an SQLite databaseSame SQLite format
.sqlite3SQLite database, version 3Same SQLite format

🛟 Is It Safe to Delete?

A common reason people look up DB files is to decide whether one can be removed, and the truthful response is that everything hinges on the job the file does.

Some DB files are throwaway caches that a program rebuilds automatically. The classic example is thumbs.db in Windows, a store of picture thumbnails that Windows simply recreates the next time it needs them, so deleting it is harmless. At the other extreme, a DB file that holds a program's real data, such as an app's saved records, your messages or a game's saved progress, is important, and removing it means losing that information for good and possibly stopping the software from working properly. Because the two look identical from the outside, the safe rule is to find out what a specific DB file does before deleting it, using the identification tips above, and to make a backup copy first if there is any doubt. When you are unsure whether a file is a disposable cache or precious data, treating it as precious and setting a copy aside costs nothing and can save a great deal of trouble.

❓ Frequently Asked Questions

A DB file is a generic database file, a container that stores information in an organized structure of tables, records and fields rather than as plain readable text. The important thing to understand is that .db is a broad label rather than a single format, so the extension tells you the file is a database but not which program created it or how the data is arranged inside. Many different applications save their databases with a .db ending, from small tools embedded in phone apps to older desktop software, and they can each organize the contents differently. By far the most common kind of DB file today is an SQLite database, a compact database held in one self-contained file, which is helpful because SQLite has well-known free tools. Because the extension alone does not reveal the format, the usual way to work with a DB file is to identify what created it first and then open it with the matching program.

How you open a DB file depends on what created it, so the first step is to identify the format, but for the common case it is simple. Most DB files are SQLite databases, and the go-to tool is DB Browser for SQLite, a free cross-platform app on Windows, macOS and Linux that displays the file's tables and records in a grid you can browse and search. Developers often use the built-in sqlite3 command-line tool instead, and there are online SQLite viewers that let you inspect a file in your browser without installing anything. If the file turns out to be a different kind of database, such as a Microsoft Access one, you would open it with that program instead. It is worth knowing that many DB files created by apps, particularly on phones, are locked or encrypted and are not meant to be opened by hand, so a file that will not open may be protected rather than damaged.

There are two reliable ways to work out what created a DB file. The first is to look at the very start of the file, since most formats leave a short signature there. If you open the DB file in a plain text editor or a hex editor and the first line begins with the readable words SQLite format 3, that confirms it is an SQLite database. The second clue is context, meaning the file's name and where it came from. A DB file inside a messaging app's folder is probably that app's chat database, a file called thumbs.db in a Windows picture folder is a thumbnail cache, and a file named sms.db from a phone backup holds text messages. Taken together, a quick look at the opening bytes and a moment's thought about the file's name and location will usually reveal the format, which then tells you the right tool to open it.

Not exactly, though the two are closely linked. SQLite is a specific database format and engine, while .db is a generic file extension that many different databases can use. The connection is that SQLite is by far the most common format saved with a .db name, so in everyday practice a DB file often is an SQLite database, but not always. Some .db files are made by other software, such as Microsoft Access or older proprietary programs, and confusingly SQLite databases are sometimes given other extensions instead, like .sqlite or .dat. So while it is a good first guess that a DB file is SQLite, and checking the file's signature will confirm it, the two terms are not interchangeable. SQLite names a particular kind of database, whereas .db just says the file is some kind of database without specifying which.

You cannot usually open a DB file directly in Excel, because a .db file is a structured database rather than a spreadsheet, and Excel does not read database formats like SQLite on its own. The practical route is to go through an intermediate step. If the DB file is an SQLite database, you can open it in a tool such as DB Browser for SQLite, then export a table to a CSV file, which Excel opens easily. That gives you the rows and columns of a chosen table in a familiar spreadsheet. Bear in mind that a database can hold many tables and relationships that a single spreadsheet cannot fully capture, so exporting is best thought of as pulling out one table at a time rather than the whole database at once. For a quick look at the data in spreadsheet form, though, exporting to CSV from a database tool and opening that in Excel works well.

Double-clicking a DB file often does nothing useful because your computer has no single default program tied to the .db extension, which is a direct result of .db being generic. Since many unrelated programs use the same ending for very different databases, the operating system cannot know which one should handle a given file, so it either does nothing or offers to search for an app. The fix is to open the file deliberately from inside the right program rather than by double-clicking. For the common SQLite case that means launching DB Browser for SQLite and opening the file from within it. It also helps to confirm the format first by checking the file's signature, as an unfamiliar .db might be a different database entirely. And if the file is a locked or encrypted app database, no ordinary viewer will open it, which is another reason a simple double-click can appear to fail.

You cannot open a database straight in Excel, so the usual path is to export its data to CSV first, which Excel reads easily. The simplest way uses DB Browser for SQLite, where you open the .db file, then choose File, Export and Table to CSV, select the table you want and save it. If you prefer the command line, the sqlite3 tool does the same by setting the output mode to CSV, turning headers on, pointing at an output file and running a SELECT query. Since a database can contain several tables, you export them one at a time, and each becomes its own CSV. Once you have the CSV you can open it in Excel to see the rows and columns, and if you want a proper Excel workbook you can then use Save As in Excel to store it as an .xlsx file. This keeps the original database untouched while giving you a spreadsheet copy of whichever table you need.

For SQLite databases these three endings usually mean the same thing, since SQLite does not require any particular extension and developers simply pick whichever they prefer. Some use .db because it plainly says database, while others choose .sqlite or .sqlite3 to make the format obvious, with the 3 pointing to the current major version of SQLite. None of these names changes what is inside the file, so its true format is decided by its contents rather than its extension, which is why checking the signature at the start of the file is more reliable than trusting the ending. Database tools reflect this by accepting all of them, so DB Browser for SQLite and similar programs open a .db, a .sqlite or a .sqlite3 file the same way. In short, treat the three as interchangeable labels for an SQLite database, and do not read a deeper meaning into which one a particular file happens to use.

Yes, you can edit a DB file if it is a readable database and not locked, though it should be done carefully. For an SQLite file the usual tool is DB Browser for SQLite, which lets you browse the tables, change values in cells, add or remove records and then write the changes back to the file. The sqlite3 command line can do the same through SQL statements for those comfortable with them. The important cautions are to work on a copy rather than the original in case something goes wrong, and to make sure the program that owns the database is not using it at the same time, since editing a database underneath a running app can confuse it or corrupt the data. It is also worth remembering that many app databases are structured in particular ways the app expects, so changing values by hand can cause the app to behave oddly. When in doubt, back up first and change as little as possible.

thumbs.db is a small database that Windows creates in a folder to store thumbnail previews of the pictures and other files inside it, which lets those little preview images load quickly next time. It is a hidden file, so you usually only notice it when hidden files are shown. Deleting it is safe, because Windows simply builds a new one the next time it needs thumbnails for that folder, so removing it causes no lasting harm and only means the previews are regenerated. If you would rather Windows stopped creating thumbs.db files, particularly on network folders where they can be a nuisance, you can turn the behaviour off through Windows settings such as Folder Options or Group Policy. So unlike a database that holds an app's real data, thumbs.db is a disposable cache, and it is one of the few DB files you can remove without a second thought.

Opening an encrypted DB file requires the correct key or password, and without it the data cannot be read. Many app databases, especially on phones, are protected so that their contents stay private, often using an encrypted form of SQLite. To open one you need a tool that supports that encryption, such as a build of SQLite with encryption support, and you must supply the key the app used. The catch is that the key is usually generated and stored by the app itself rather than being a password you chose, and it may be kept in a protected part of the device, so reaching it can require deep access to the system that ordinary users do not have. Because of this, an encrypted app database is often not realistically openable by hand, and the intended way to see its data is through the app that created it. If a DB file refuses to open and appears scrambled, encryption is a likely reason, and that is by design rather than a fault.

A great many programs create DB files, which is exactly why the extension is so hard to pin down. The most common source is any software built on SQLite, which includes web browsers storing history and settings, countless mobile apps keeping contacts, messages and app data, and desktop programs saving their own information. Windows itself makes thumbs.db files for thumbnail caches, older desktop databases such as Microsoft Access have used the ending, and some games save progress in DB files. Because so many unrelated tools reach for the same .db name, knowing which program made a particular file matters more than the extension alone. The reliable way to find out combines the two clues covered earlier, since checking whether the file begins with the SQLite signature, and looking at its name and the folder it lives in, usually reveals the application responsible.

📝 Summary

A DB file is a database file that stores information in tables, records and fields, but .db is a generic extension that does not reveal which program created it, so two DB files can share the ending while being completely different inside. By far the most common kind is an SQLite database, a whole database packed into one self-contained file, which is good news because SQLite has well-supported free tools. The practical approach is to identify the file before opening it, chiefly by checking whether it begins with the text SQLite format 3 and by considering its name and location, since a file like thumbs.db is a Windows thumbnail cache while sms.db holds phone messages. Once you know the format, you open it with the matching tool, most often DB Browser for SQLite for an SQLite file, the sqlite3 command line or an online viewer, or Microsoft Access for an Access database. Helper files ending in .db-journal, .db-wal or .db-shm belong to the database and should not be deleted while it is in use. Whether a DB file is safe to delete depends on its purpose, since a thumbs.db cache is disposable but an app's data file is not, so the safe habit is to identify a file and back it up before removing it.