Skip to content

SQLite database viewer and SQL query tool

Explore tables, indexes, and DDL inside local SQLite databases and export SQL query results cleanly to CSV, Excel, or JSON using self-hosted WebAssembly.

Open SQLite 3 database

Drop a .sqlite, .sqlite3, or .db file here

Runs self-hosted sql.js WebAssembly locally in read-only mode.

How to use SQLite viewer

  1. Open a SQLite database file. Drop a .sqlite, .sqlite3, .db, or .s3db file onto Open SQLite 3 database, or click Load sample database to test sample-ledger.sqlite.
  2. Browse tables and schemas. Inspect Tables & Views, File Size & Page Size, and SQLite Engine cards, then click any table inside Schema explorer to inspect DDL and rows.
  3. Run read-only SQL queries. Enter a SELECT, WITH, PRAGMA, or EXPLAIN statement, select Max rows between 200 and 1,000, and press Cmd+Enter or click Run SQL query.
  4. Download query exports. Review typed cells including NULL and BLOB summaries, then click Export CSV, Export Excel, or Export JSON.

Everything runs in this browser tab. Nothing you paste or open is uploaded or logged, so it's safe for keys, tokens and private data.

How does SQLite run locally inside browser WebAssembly?

Self-hosted WebAssembly binaries load straight from this site into a background worker thread, keeping customer tables in local RAM rather than remote servers. Opening any SQLite file validates its binary magic header and queries B-tree pages completely offline.

Before instantiating sql.js, the local worker fetches a self-hosted 688 KB WebAssembly module (/vendor/sqljs/sql-wasm-browser.wasm) so zero external CDN requests ever fire. Our database viewer verifies that dropped files span at least 100 bytes and start with the 15 byte "SQLite format 3" magic header defined in the SQLite database file format documentation.

Click Load sample database to explore sample-ledger.sqlite containing linked customers and invoices tables, or drop local .sqlite, .sqlite3, .db, and .s3db dumps up to browser memory capacity. Top cards summarize Tables & Views, File Size & Page Size (4096 B pages on standard schemas), and the running SQLite Engine version.

Engineers auditing multi-file application bundles often inspect API contracts alongside embedded persistence stores; try offline API schema inspection without cloud uploads in the same local workspace.

Browsing table schemas, indexes, and read-only SQL queries

Inspecting unfamiliar mobile app databases, browser extension stores, or Electron caches starts cleanly inside Schema explorer. Every non-internal table and view outside sqlite_% lists exact row counts, columns, primary keys, indexes, and original CREATE DDL.

Schema explorer, primary keys, and index metadata

Schema introspection invokes sqlite_schema alongside PRAGMA table_info and PRAGMA index_list documented in the SQLite PRAGMA metadata statements reference. Clicking any entry inside Schema explorer highlights PK primary-key indicators, shows declared types (or ANY for untyped columns), and runs SELECT * FROM "customers" LIMIT 200; automatically against your selected table.

Inspecting existing secondary indexes alongside original CREATE TABLE DDL reveals foreign-key relationships and sort orders before you compose custom filters or joins.

Read-only SQL guardrails and single-statement safety

To prevent destructive query paste mistakes or chained SQL injection strings inside shared workbooks, assertReadOnlySql sanitizes input before execution. It strips leading -- line comments and /* ... */ block comments, masks single-quoted string literals so harmless semicolons inside text values stay valid, and rejects internal statement chaining.

Only leading SELECT, WITH, PRAGMA, or EXPLAIN statements execute, blocking INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, REPLACE, TRUNCATE, ATTACH, DETACH, VACUUM, and REINDEX. When cleaning verbose multi-join queries for bug reports, format multi-line SQL queries cleanly before sharing them with teammates.

Running SELECT, CTE, and EXPLAIN queries with row caps

Type statements directly into Read-only SQL query (SELECT, WITH, PRAGMA, EXPLAIN) and press Cmd+Enter, Ctrl+Enter, or Run SQL query. Following the SQLite SELECT query language specification, both recursive WITH common table expressions and EXPLAIN QUERY PLAN diagnostics run natively inside WebAssembly.

Choose Max rows (200, 250, 500, or 1,000 in UI controls, clamped to 5,000 in library helpers) so wide joins never freeze rendering. Live status bars report exact timing such as Returned 250 rows in 14 ms plus (row cap reached) whenever truncated.

Inspecting NULL, BLOB, and exported CSV, Excel, or JSON results

Query result grids retain strict distinction between empty strings, missing database nulls, numeric aggregates, and raw binary fields during inspection and download.

Distinguishing SQL NULL values from binary BLOB bytes

Typed grid cells render SQL NULL in explicit italic styling so blank strings never masquerade as missing column values. Raw Uint8Array payloads format cleanly as [BLOB N B: hex...] previews showing byte lengths alongside the first 12 bytes in hexadecimal.

SQLite storage class Viewer grid display JSON export output CSV / Excel cell formatting Practical debugging benefit
INTEGER / REAL Right-aligned exact numeric value Native JSON number Typed Excel number cell Accurate sums and ID inspection
TEXT Plain UTF-8 string value JSON string literal CWE-1236 formula escaped CSV Safe handling of leading symbols
NULL Italic NULL badge JSON null literal Empty cell in sheet exports Separates "" from missing NULL
BLOB (Uint8Array) [BLOB N B: 12-byte hex...] Hex preview string Compact readable hex summary Avoids unreadable binary garbage
ANY / untyped Preserves runtime cell value Matches underlying value Typed or escaped string cell Inspects legacy flexible schemas

Exporting SQLite query results to CSV, Excel, and JSON

Once your query grid reflects the right slice, click Export CSV, Export Excel, or Export JSON to download local files straight from browser memory. Export CSV prepends a UTF-8 byte order mark (\uFEFF) and runs MITRE CWE-1236 formula neutralization across =, +, -, and @ prefixes.

Export Excel builds an .xlsx workbook containing a typed SQLite Result worksheet, while Export JSON outputs a two-space indented array of row objects. When flattening downstream nested API responses into matching tabular sheets, pair exports with query result conversion from JSON to CSV.

Why might recent changes disappear if a database uses WAL mode?

Write-Ahead Logging stores recent uncommitted transactions inside an external -wal companion file rather than appending directly to the main database binary. Copying an uncheckpointed .sqlite or .db file alone leaves only older pages inside that standalone snapshot.

Modern desktop applications, mobile SDKs, and Electron tools frequently enable WAL journal mode paired with -wal and -shm shared-memory companion files, as documented in the SQLite write-ahead logging journal mode guide.

Copying a live .db file out of an active application directory without running a checkpoint first leaves recent commits stranded inside -wal. Browser WebAssembly reads only the single uploaded file buffer, treats it as immutable, and never locates or merges detached companion journals from disk automatically.

Tip: Execute PRAGMA wal_checkpoint(TRUNCATE); against your source database (or stop the host service cleanly) before opening .db or .sqlite snapshots in browser WebAssembly so every recent table write appears immediately.

Comparing relational SQLite dumps with columnar Parquet tables

Running local WebAssembly analytics inside an offline SQLite viewer keeps proprietary customer ledgers, local telemetry caches, and embedded device logs off third-party query services. Developers and security analysts routinely inspect .sqlite3, .s3db, and .db exports extracted from mobile backups, desktop caches, or edge microservices without installing native database clients or risking accidental row mutations.

Because dev.worker.ts isolates WebAssembly execution and query parsing away from the main UI thread, read-only database exploration finishes inside browser RAM without writing temporary files back to disk or leaking schema details over external network requests. Schema inspection, query execution, and spreadsheet downloads all execute cleanly inside one private browser tab.

When analytical workflows compare embedded .sqlite lookup tables against partitioned warehouse exports, inspect accompanying .parquet files directly in our Parquet Viewer without installing Python, cloud connectors, or desktop database software.

Questions

How does SQLite open .db and .sqlite3 files without uploading to a server?

The tool fetches a self-hosted WebAssembly build of SQLite (sql-wasm.wasm) directly from /vendor/sqljs/ and executes all queries inside a local Web Worker. Your database file loads into browser memory as a read-only Uint8Array, so zero rows or schemas cross the network.

Which SQL commands are allowed in read-only mode?

The read-only validator permits single-statement SELECT, WITH common table expressions, PRAGMA metadata checks, and EXPLAIN query plans. Mutation and schema statements including INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, ATTACH, DETACH, VACUUM, and REINDEX raise immediate safety errors.

Why are recent rows missing when opening a .db file using WAL mode?

Databases configured with Write-Ahead Logging store uncheckpointed commits inside an auxiliary -wal journal file rather than directly in the main .db file. Run PRAGMA wal_checkpoint(TRUNCATE) against the live database first so copied single-file snapshots contain all recent transactions.

How does the viewer display SQL NULL values and binary BLOB columns?

SQL NULL cells render explicitly in italics so empty strings never look identical to missing database values. Binary BLOB Uint8Array payloads summarize byte sizes and first 12 hexadecimal bytes inline as [BLOB N B: hex...] instead of printing broken characters.

How many rows can a single SQL query return in the workbench?

Selecting Max rows lets you choose 200, 250, 500, or 1,000 rows in the user interface, while underlying library execution clamps batches up to 5,000 rows. When results hit your chosen limit, the timing banner highlights a row cap warning.

Can I run multi-statement SQL scripts or modify database rows?

No. Before execution, assertReadOnlySql strips leading comments and quoted string literals, then rejects any remaining internal semicolons or write keywords. Opening files read-only inside WebAssembly ensures accidental queries can never overwrite original disk files.

Updated