Guide
How to view a SQLite database on Windows
Published
Windows doesn’t come with a SQLite viewer, and double-clicking a .db file usually just asks which app to use. Here are three ways to look inside one, from no install at all to a full desktop app.
First: show file extensions
File Explorer hides extensions by default, so data.db appears as just data. Turn them on so you can see what you’re dealing with:
- Windows 11: in File Explorer, choose View → Show → File name extensions.
- Windows 10: in File Explorer, open the View tab and tick File name extensions.
Option 1: In your browser (no install)
- Open opensqlite.com in Edge, Chrome or Firefox.
- Drag the database from File Explorer onto the drop zone, or click Open SQLite file and choose it.
- Pick a table to browse its rows. Click a column name to sort, search within the table, and click a row to see every field.
The file is read by SQLite running inside the browser tab and never uploaded. It’s opened read-only, so it can’t be changed. If the file has an unusual extension, or none at all, drag it in rather than using the file picker.
Option 2: DB Browser for SQLite (desktop app)
DB Browser for SQLite is a free, open-source app with a spreadsheet-like view, a SQL editor, editing and CSV export. Download the installer from its website, or install it from a terminal with winget (included with current versions of Windows 10 and 11):
winget install -e --id DBBrowserForSQLite.DBBrowserForSQLite
To browse without risk of editing anything, use File → Open Database Read Only.
Option 3: The sqlite3 command-line tool
The official sqlite3 shell isn’t included with Windows, but it’s one command away:
winget install -e --id SQLite.SQLite
Alternatively, download the sqlite-tools-win-x64 zip from the SQLite download page, extract it, and run sqlite3.exe from that folder.
Open a new terminal window after installing, then open your database read-only. In File Explorer, Shift + right-click the file and choose Copy as path to get its full path, quotes included:
sqlite3 -readonly "C:\Users\you\Downloads\mydata.db"
At the sqlite> prompt:
.tables
.schema Track
.mode box
SELECT * FROM Track LIMIT 10;
.quit
In order: list the tables, show how a table is defined, draw results as a neat table, show the first 10 rows, and exit. (Track is a table in the Chinook sample database; use your own table names.) Lines starting with a dot are shell commands; everything else is SQL and ends with a semicolon.
Where Windows apps keep their SQLite files
Most apps store data under your user profile, in folders File Explorer hides by default. Paste these into the address bar:
| Location | What’s inside |
|---|---|
%APPDATA% |
Roaming app data, e.g. Firefox profiles (Mozilla\Firefox\Profiles\…\places.sqlite) |
%LOCALAPPDATA% |
Local app data, e.g. Chrome and Edge profiles (Google\Chrome\User Data\Default\History) |
%LOCALAPPDATA%\Packages |
Microsoft Store apps |
Browser files such as History have no extension but are still SQLite databases.
A few things to keep in mind:
- Close the app and work on a copy. Running apps keep their databases open, so you may get “database is locked” or “the file is in use”. Quit the app, copy the database (with any
-walfile next to it) to your Desktop and open the copy. What the -wal and -shm files are. - Thumbs.db isn’t SQLite. Those files in your picture folders are Windows’ thumbnail cache, a different format. You can ignore them.
Which should you use?
- Quick look, nothing installed: your browser.
- Editing, exporting or regular use: DB Browser for SQLite.
- Queries and scripting:
sqlite3.
New to SQLite files? Start with how to open a .db file.