Open a SQLite database file to see its tables with row counts, browse the data page by page, read the schema and run your own SQL queries. Results export to CSV, and the file never leaves your device.
Last updated:
File header
–
CREATE statements
Ctrl + Enter also runs it. Changes stay in memory until you download the database.
Advertisement
How to use the SQLite Viewer
Open your database: drop the .db or .sqlite file onto the box or click it to choose a file. No file handy? Press “View sample database”.
Check the file header card for the page size, encoding and the SQLite version that last wrote the file.
Pick a table on the left to browse its rows. Use the arrows to page through and change how many rows you see per page.
Open Schema to see the columns, types and CREATE statements, or Run SQL to type a query and press Run Query.
Export a query result or a whole table as CSV, or download the database after making changes with SQL.
The SQLite file header explained
Every SQLite 3 database starts with a 100-byte header. The viewer reads it directly from the file before loading the SQLite engine, so you can identify a file even offline. All multi-byte values are big-endian.
User version (PRAGMA user_version), often an app's schema version
0
68
4
Application ID (PRAGMA application_id)
0, or e.g. GeoPackage
96
4
Version of SQLite that last wrote the file
3045001 = 3.45.1
Handy SQLite queries
Task
Query
List tables
SELECT name FROM sqlite_master WHERE type = 'table';
Columns of a table
PRAGMA table_info(books);
First 100 rows
SELECT * FROM books LIMIT 100;
Count rows per value
SELECT year, COUNT(*) FROM books GROUP BY year ORDER BY 2 DESC;
Join two tables
SELECT b.title, a.name FROM books b JOIN authors a ON a.id = b.author_id;
Find duplicates
SELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*) > 1;
Database size check
PRAGMA page_count; PRAGMA page_size;
Integrity check
PRAGMA integrity_check;
Where you will find SQLite files
SQLite is the most widely deployed database in the world. You will come across it in browser profiles (history, cookies and bookmarks), Android and iOS app data, desktop apps such as Lightroom catalogues, messaging and note-taking apps, GIS formats like GeoPackage (.gpkg) and MBTiles map tiles, and countless embedded devices. Many of these use extensions other than .db, but they all start with the same “SQLite format 3” header that this viewer checks.
Frequently asked questions
How do I open a .db file?
Most .db files from apps are SQLite databases. Drop the file onto this page and its tables appear in a few seconds. If the tool says the header is missing, the file is a different format; the message tells you what it looks like instead.
Is my database uploaded to a server?
No. The file is read into your browser's memory and opened with sql.js, a WebAssembly build of SQLite. Only the sql.js library itself is downloaded from a CDN; your data never leaves your device.
Can I edit the database?
Yes. Run INSERT, UPDATE, DELETE or CREATE statements in the Run SQL tab. Changes are made to an in-memory copy; press Download database to save the edited file. Your original file is never modified.
Why do I see a -wal or -journal error?
SQLite keeps temporary companion files next to a database, such as app.db-wal or app.db-journal. They are not databases by themselves. Open the main file (app.db). If the app is still running, close it first so recent changes are written into the main file.
How large a SQLite file can I open?
Files of a few hundred megabytes usually work on a desktop computer; the limit depends on your device's memory because the whole file is loaded into the browser. Files over 1 GB are refused to keep the tab responsive.
Can it open encrypted databases?
No. Databases encrypted with SQLCipher or the SQLite Encryption Extension, such as some messenger backups, cannot be read without the key. They usually fail with a “file is not a database” error.
What does the “Written by SQLite” version mean?
Bytes 96–99 of every SQLite file store the version number of the SQLite library that last modified it, for example 3045001 for version 3.45.1. It helps when debugging compatibility between apps.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.