SQLite reader
Open a .db file in the browser with sql.js (SQLite compiled to WebAssembly), list tables, views and row counts, run read-only SQL and export CSV or JSON without uploading anything.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
SQLite database file
Supports .db / .sqlite / .sqlite3 / .db3. The file is read in browser memory by sql.js (SQLite compiled to WebAssembly) and never uploaded.
Database objects
Tables and views read from sqlite_master, with real COUNT(*) row numbers (a view may fail to count).
No database loaded yet
One read-only query at a time (SELECT / WITH / EXPLAIN / VALUES / read-only PRAGMA). INSERT, UPDATE, DELETE and DDL are rejected, so the database is never modified.
Query result
The text table comes from the real { columns, values } returned by sql.js.
Pick a file or load the sample database, then run a query
What this tool does
- Drop an exported .db / .sqlite file in, see which tables and views exist and how many rows each holds, then decide what to query.
- Run a read-only SELECT (or WITH / EXPLAIN) to check the data, copy the table or export it as CSV / JSON for a spreadsheet.
- Confirm that a statement really is read-only: writes, DDL and write PRAGMAs are rejected locally and the original file is never modified.
Example
Input
SELECT name, city, score FROM users ORDER BY id
Output
| name | city | score | | ---- | ---- | ----- | | 张三 | 北京 | 9.5 | | 李四 | 上海 | 8.25 | | 王五 | NULL | NULL |
This is the real result from the built-in sample database (three rows in users); the row and column counters also come from the columns/values returned by sql.js.
Frequently asked questions
How is the SQLite file read?
With the sql.js dependency already in this project: the official SQLite sources compiled to WebAssembly open your file in browser memory. Tables come from sqlite_master and row counts are real COUNT(*) queries. Nothing is uploaded and no network access is used.
Can it modify my data?
No, deliberately. Only a single read-only statement is accepted (SELECT / WITH / EXPLAIN / VALUES / read-only PRAGMA). INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, ATTACH, VACUUM, transaction control and write PRAGMAs such as journal_mode are rejected, and the check runs before execution, so the source file is untouched. sql.js itself only ever opens an in-memory copy, but writes are blocked anyway.
What if WebAssembly fails to load?
The page says explicitly that the in-memory SQLite engine failed to load and what to do next (reload or switch to a desktop tool). It happens when a browser disables WebAssembly or when the wasm asset is missing from the build output.
Why only one statement at a time?
Multiple statements would make the read-only check meaningless (a SELECT followed by a DELETE, for instance), so any input containing a semicolon is rejected with a clear message. Semicolons inside string literals or comments do not trigger it.
What are the limits?
File extensions .db / .sqlite / .sqlite3 / .db3; at most 1000 rows displayed (100 by default); cells longer than 40 characters are truncated on screen but exported in full to CSV and JSON; BLOBs are shown as hexadecimal. Encrypted (SQLCipher) database files cannot be opened.
Keywords:sql.jsWebAssembly SQLiteSQLite reader