What Is a DB File?

How to Open, Edit, and Convert DB Files

Screenshot of several DB files in Windows 10
DB Files.

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 DB files 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 file extension might not be database files at all, like the Windows Thumbnail Cache format used by Thumbs.db files. Windows uses these DB files to show thumbnails of a folder's images before you open them.

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 DB files stored on them are probably used to hold some sort of application data, whether it be 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.

These DB files might be encrypted and impossible to open normally, or they might fully viewable and editable in a program like SQLite, if the DB file is in the SQLite database format.

Database files used by other applications like Microsoft Access, LibreOffice programs, 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; see Stack Overflow for more information.

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\<Skype username>\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.

Tip: 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 would not 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 (Windows Key + R). Then, go into the View tab and select 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:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\

Note: 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 with Everything, or through 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.

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 convert the DB file.

If your DB file can't even be opened with a normal program, like most DB application files or encrypted DB 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.