What Is a DB File?

How to open, edit, and convert DB files

What to Know

  • A DB file is a database-related file.
  • Most can't be opened manually but are instead used by various programs automatically.
  • Some can be converted to JPG or CSV.

This article explains several types of DB files, what common ones are used for and how they open, and an explanation of Windows Thumbs.db files.

What Is a DB File?

The .DB file extension is often used by a program to indicate that the file is storing information in some kind of structured database format.

For example, mobile phones might use them to store encrypted application data, contacts, text messages, or other information.

Other programs might use DB files for plugins that extend the functions of the program, or for keeping information in tables or some other structured format for chat logs, history lists, or session data.

Some files with the DB extension might not be database files at all, like the Windows Thumbnail Cache format used by Thumbs.db files. Windows uses these files to show thumbnails of a folder's images before you open them.

Screenshot of several DB files in Windows 10
DB Files.  

How to Open a DB File

There's a wide range of uses for DB files, but just because they all use the same file extension doesn't mean that they store similar data or can be opened/edited/converted with the same software. It's important to know what your DB file is for before choosing how to open it.

Phones that have these files stored on them are probably used to hold some sort of application data, whether it's part of the application files itself or personal data stored within the app or operating system.

For example, text messages on an iPhone are stored in an sms.db file in the /private/var/mobile/Library/SMS/ folder. They might be encrypted and impossible to open normally, or they might be fully viewable and editable in a program like SQLite if they're in the SQLite database format.

Database files used by other applications like Microsoft Access, LibreOffice, and Design Compiler Graphical can sometimes be opened in their respective program or, depending on the data, imported into a different application that can use it for a similar purpose.

Skype stores a history of chat messages in a DB file called main.db, which can be moved between computers to transfer the message log, but probably not opened directly with the program. However, you might be able to read Skype's main.db with a database file browser.

Depending on your Skype version, the main.db file might be located at either of these locations:

  • C:\Users\[username]\AppData\Local\Packages\Microsoft.SkypeApp_kzf8qxf38zg5c\LocalState\\main.db
  • C:\Users\[username]\AppData\Roaming\Skype\[Skype username]\main.db

What Are Thumbs.db Files?

Thumbs.db files are automatically created by some versions of Windows and put into folders that contain images. Every folder with a Thumbs.db file only has one of these DB files.

See How to Repair Damaged or Corrupted Thumbs.db Files if you're getting a kernel32.dll error that's related to a Thumbs.db file.

The purpose of the Thumbs.db file is to store a cached copy of the thumbnail versions of the images in that specific folder so that when you view the folder with thumbnails visible, you get to see a small preview of the image without having to open it. This is what makes it really easy to sift through a folder to find a specific picture.

Without the Thumbs.db file, Windows wouldn't be able to render these preview images for you and would instead just show a generic icon.

Deleting the DB file would force Windows to regenerate all of those thumbnails each time you request them, which might not be a quick process if the folder contains a large collection of pictures or if you have a slow computer.

There aren't any tools included with Windows that can view Thumbs.db files, but you might have luck with Thumbs Viewer or Thumbs.db Explorer, both of which can show you which images are cached in the DB file as well as extract some or all of them.

How to Disable Thumbs.db Files

It's safe to delete Thumbs.db files as many times as you like, but Windows will keep making them to store these cached thumbnails.

One way around this is to open Folder Options by executing the control folders command in the Run dialog box (WIN+ R). Then, go into the View tab and select Always show icons, never thumbnails.

Windows 10 folder option to always show icons never thumbnails.

Another way to stop Windows from making Thumbs.db files is to change the DWORD value DisableThumbnailCache to have a data value of 1, at this location in Windows Registry:


You might need to restart your computer for the registry change to take effect.

If you make this change, Windows will stop showing image thumbnails, which means you'll have to open each picture to see what it is.

You should then be able to delete any Thumbs.db files that are taking up unnecessary space. You can quickly delete all Thumbs.db files by searching for them or by using the Disk Cleanup utility (execute it from the command line with the cleanmgr.exe command).

If you can't delete a Thumbs.db file because Windows says that it's open, switch Windows Explorer to Details view to hide the thumbnails, and then try again to delete the DB file. You can do this from the View menu when you right-click white space in the folder.

View Details menu option in Windows 10 File Explorer

How to Convert DB Files

DB files used with MS Access and similar programs are usually able to be converted to CSV, TXT, and other text-based formats. Try opening the file in the program that created it or is actively using it, and see if there's an Export or Save As option that lets you trigger the conversion.

If your DB file can't even be opened with a normal program, like most application files and encrypted files, then there's little chance that there's a DB converter that can save the file to a new format.

The Thumbs.db viewers above can export the thumbnails from a Thumbs.db file and save them to the JPG format.

This file has nothing to do with DBF files even though they might appear related.

  • Can I open a DB file in Excel?

    Yes. In the Data tab, select Get Data > From Database, then choose the program you want to import the DB file from. Importing data establishes a permanent connection that can be refreshed, so the database will stay up-to-date if you make changes.

  • Can I open a DB file in MySQL?

    Yes. In the MySQL Workbench, go to MySQL Connections and enter the database information. Once connected to the database, go to Data Import/Restore and select Import from Self-Contained File.

  • How do I open an SQLite file?

    Use an app or web tool that allows you to view and edit SQLite files. For example, go to SQLite Viewer with Google Drive to open SQLite ​files in the Chrome browser.

Was this page helpful?