What a .db file is and why you can't just double-click it

A .db file is a database — a structured collection of data stored in a format that a regular text editor or word processor cannot read. When you double-click a .db file, your computer does not know which program should open it, because .db is a generic extension used by dozens of different applications. SQLite, Microsoft Access, FileMaker, and many others all use .db as a file extension, so the same extension can mean completely different things depending on which program created it.

The program that created the .db file is the one that knows how to read it. If you have that program installed, opening the file is straightforward. If you do not, you have a few options: find the original program, use a generic database viewer, or convert the file to a format you can read in a spreadsheet or text editor.

Key Takeaways

  • A .db file is a database that requires a specific program to open — the program that created it is your best option.
  • If you do not know which program created the file, try opening it with SQLite Browser (free, works on Windows, Mac, and Linux) to see if it is a SQLite database.
  • You can export data from a .db file to CSV or Excel format so you can view it in a spreadsheet program you already have.
  • If the file is password-protected or encrypted, you will need the original program and the correct password to open it.

Identify which program created the .db file

Before you try to open the file, find out what program made it. Check the folder where the file lives — often there are other files nearby that give you a clue. Look for a readme file, a setup program, or other files with the same name as the .db file but different extensions. If the .db file came from an email or download, check the source or the website you downloaded it from.

You can also right-click the .db file (on Windows) or Control-click it (on Mac), then select "Get Info" or "Properties" to see when it was created and sometimes what program last modified it. If the file came from a work computer or a colleague, ask them directly which program they used to create it.

Open a .db file with the original program

If you know which program created the file, install that program if you do not already have it, then open the program and use its File menu to open the .db file. This is the most reliable method because the program knows exactly how the data is organized inside the file.

For example, if the file was created in Microsoft Access, open Access, click File, then Open, and navigate to the .db file. If it was created in FileMaker, open FileMaker and do the same. The program will read the file and display the data in the format it was designed for.

Use SQLite Browser if you do not know the original program

Many .db files are SQLite databases, a common format used by thousands of programs. SQLite Browser (also called DB Browser for SQLite) is a free program that can open and display SQLite databases on Windows, Mac, and Linux. Download it from sqlitebrowser.org, install it, then open the program and click File → Open Database. Navigate to your .db file and click Open.

If the file opens and you see tables with data inside, it is a SQLite database and you can browse the contents. If SQLite Browser cannot open the file or shows an error, the file is likely a different type of database that requires a different program. If you see data but it looks like gibberish or encrypted text, the database may be password-protected.

Export .db data to CSV or Excel

Once you have the .db file open in the correct program or in SQLite Browser, you can export the data to a format you can open in Excel or Google Sheets. In SQLite Browser, right-click a table name on the left side and select "Export table as CSV". Choose where to save the file, and you will get a CSV file that opens in any spreadsheet program.

If you are using the original program (like Access or FileMaker), look for an Export option in the File menu. Most database programs let you export individual tables or the entire database as CSV, Excel, or other formats. This is useful if you only need to view the data and do not need to edit it in the original program.

What to do if the file is password-protected

If the .db file is password-protected, you will need the correct password and the original program to open it. SQLite Browser and other generic viewers cannot bypass password protection. If you created the file yourself and forgot the password, you may be out of luck — most database programs do not have a password recovery option.

If someone else created the file and protected it, contact them for the password. If the file came from a work computer or a project you no longer have access to, you may need to contact your IT department or the original creator to recover the data.

Frequently Asked Questions

Can I open a .db file in Notepad or Word?

No. A .db file is binary data, which means it is not stored as readable text. Opening it in Notepad or Word will show you random characters and symbols that are not useful. You need a program designed to read database files.

What if SQLite Browser says "file is not a database"?

The file is not a SQLite database. It was created by a different program. Try searching online for the file extension along with the word "database" to find out what program uses it, or ask the person who gave you the file which program they used.

Can I convert a .db file to a regular text file?

Not directly, but you can export the data to CSV or Excel, which are text-based formats. Open the .db file in the correct program or SQLite Browser, export each table as CSV, and you will have readable text files with the data organized in rows and columns.

Is it safe to open a .db file from someone I do not know?

A .db file itself cannot run code or infect your computer just by being opened. However, if you open it with a program that has security vulnerabilities, there is a small risk. Use SQLite Browser (which is simple and has few vulnerabilities) or a program from a trusted source. If you are unsure about the file, ask the person who sent it what program created it.