.db File Extension

Learn what a .db file may contain, how to identify and open it safely, how Poly supports it, and when to export the data.

File extension details for .db

Storage Only
File typeDatabase file, often SQLite or application-specific
MIME type
EncodingBinary; structure depends on the database engine or application
Operating systemsWindows, macOS, Linux, iOS, Android
Opens withSQLite command-line shell, DB Browser for SQLite, Originating application
Poly supportYes. Poly stores, syncs, shares, versions, and downloads DB files.
Indexed by PolyName only. Database schemas, tables, rows, and embedded text are not indexed.
Preview in PolyNo. Download the file and open it with the matching database software.
Poly agentNo. The Poly agent cannot query or read the database contents.

What kind of file is a .db?

A .db file contains data organized by a database engine or application. The suffix is generic, so it does not define one universal format. Many are SQLite 3 databases and can use the registered application/vnd.sqlite3 MIME type. Others use unrelated layouts.

Check the contents before choosing an app. A SQLite 3 main database starts with these 16 bytes, which spell SQLite format 3 followed by a zero byte:1

53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00

The Windows filename Thumbs.db is different. Windows XP used it as a per-folder thumbnail cache.2 A file without the SQLite header may require the application that created it.

Changing records.db to records.sqlite does not convert or identify the database. SQLite itself imposes no filename-extension requirement.3

How do I open a .db on my computer?

If the header identifies SQLite, use the official sqlite3 shell or DB Browser for SQLite on Windows, macOS, or Linux. Start with a copy of an unfamiliar database and open it read-only:

sqlite3 -readonly records.db

Use .tables to list tables, .schema to inspect definitions, and PRAGMA quick_check; to check consistency.4

If SQLite reports that the file is not a database, do not assume it is damaged. Look for the creating application's name or documentation for the device or program that produced it. On mobile devices, .db files are often application data rather than user-facing documents.

Treat an unknown database as untrusted input. SQLite recommends defensive settings and integrity checks because a crafted schema can trigger unsafe application behavior through features such as views, triggers, and virtual tables.4

Poly support for .db

Poly stores, syncs, shares, versions, and downloads .db files, and you can find them by filename and ordinary file properties. Poly does not infer SQLite from the .db suffix alone because the extension is ambiguous.

There is no in-app database browser. Poly does not index schemas, tables, rows, or embedded text, and the Poly agent cannot query the contents. Supply the application/vnd.sqlite3 MIME type when a workflow already knows the file is SQLite, then download it for inspection.

History of .db

.db is a descriptive abbreviation for “database,” not an extension introduced by one standard or vendor. Its meaning therefore follows the creating application.

SQLite was first released in 2000, and SQLite 3 introduced its current incompatible on-disk generation on June 18, 2004.5 SQLite does not require .db, but IANA included it alongside .sqlite and .sqlite3 when registering application/vnd.sqlite3 in 2018.6 Microsoft also used the exact filename Thumbs.db for folder thumbnail caches in Windows XP, illustrating why the suffix alone is not a reliable format test.2

Working with .db and alternatives

For a SQLite database, choose an export based on what must survive:

OutputBest forWhat may be lost
SQL dumpRebuilding schema and rowsEngine-specific runtime state
CSVOne table or query resultRelationships, types, indexes, triggers, and BLOB fidelity
JSONApplication or API interchangeNo universal mapping for a relational schema

The SQLite shell's .dump command creates a text representation of schema and data.7 CSV results are easier to preview and search in Poly, but keep the original when you need constraints or relationships.

Do not copy a live SQLite main file casually. Recent committed changes can reside in a companion -wal file. Use SQLite's backup facilities or a database-aware export to create a consistent standalone copy.1

Footnotes

  1. SQLite Project. Database File Format. The specification defines the header, pages, and transaction side files. 2
  2. Microsoft. IThumbnailCache Interface. Microsoft documents the per-folder Thumbs.db cache used by Windows XP. 2
  3. SQLite Project. SQLite as an Application File Format. SQLite allows any suffix and provides an Application ID for finer identification.
  4. SQLite Project. Defense Against the Dark Arts. The guidance covers untrusted database files, defensive configuration, and integrity checks. 2
  5. SQLite Project. SQLite Release 3.0.0. The release notes date the SQLite 3 format and summarize its major changes.
  6. Internet Assigned Numbers Authority. application/vnd.sqlite3 Media Type Registration. It lists .db, .sqlite, and .sqlite3 and documents the 2018 registration.
  7. SQLite Project. Command-Line Shell for SQLite. The manual documents database inspection, CSV output, and the .dump command.
© Poly Corp. 2026