viewhack

SQLite viewer: open .db and .sqlite files in your browser

Drop a SQLite database to see every table with its row count, the CREATE statement behind it, the rows in a grid you can scroll and sort, and a SQL box that can only read. It runs real SQLite (3.49.1, compiled to WebAssembly by sql.js 1.14.2) inside this tab.

The database is opened on your device. It is never uploaded.

What it shows

The SQL box can only read

The database is opened with PRAGMA query_only = ON, so SQLite itself refuses any write. On top of that, the box accepts one statement at a time and only SELECT, WITH … SELECT, VALUES, EXPLAIN and reading PRAGMAs such as table_info and integrity_check. The engine works on a copy in memory anyway, so nothing typed here could change the file on your disk.

Queries worth knowing:

Files that are SQLite inside

viewhack goes by the file's first 16 bytes, not its extension, so these open too:

Databases with a -wal file

A database in write-ahead-log mode does not write changes into its own file straight away. Each committed transaction is appended to a second file with the same name plus -wal (History and History-wal, notes.db and notes.db-wal), and only a checkpoint copies those pages back into the main file. By default SQLite checkpoints once the log reaches 1,000 pages (about 4 MB with 4 KB pages) or when the last connection closes cleanly (sqlite.org: Write-Ahead Logging). So a copy of a database taken while its app is running, from a browser profile, a chat app or a phone backup, can be missing everything written since the last checkpoint: new rows, new tables, deletions.

Drop the database and its -wal together, or choose both at once, or open the database first and press Add …-wal. The page reads the log the way SQLite's own recovery does, following the file-format document (sqlite.org: Database File Format, section 4):

A banner then says how many frames were applied, and Row counts with and without the -wal puts each table's count from the main file alone beside its count with the log, so you can see what the log added or deleted. The -shm file next to them is only an index SQLite rebuilds from the log, and is not needed. A -wal dropped on its own is named as a log, and the page tells you which database file it belongs to. It cannot be read alone, because it only holds the pages that changed.

What it cannot open

Size limit

Unlike the CSV and Parquet viewers, which read the file piece by piece, SQLite here needs the whole database in memory. The file is read into the tab, then copied into a WebAssembly heap that cannot grow past 2 GB. The page warns above 300 MB. Databases of a few hundred MB usually open on a desktop. On a phone, 100 to 200 MB can already fail. If yours is bigger, the sqlite3 command-line tool opens it without loading it all.

Made with AI tools. · Privacy