The SQLite Schema Viewer reveals the complete structure of a SQLite database — its tables, columns, indexes, views and triggers — without opening a desktop GUI or typing .schema at a prompt. Because SQLite records every object’s definition in a built-in catalogue, the schema can be read directly from the file in the browser. This is ideal for understanding an unfamiliar database, reviewing migrations or documenting a data model.
How it works
SQLite stores its catalogue in a table named sqlite_master, whose b-tree always begins on page 1 of the file. The viewer reads the database header to find the page size, then walks that b-tree, decoding each record into five fields: type, name, tbl_name, rootpage and sql.
The sql field contains the original CREATE TABLE, CREATE INDEX, CREATE VIEW or CREATE TRIGGER statement exactly as it was written. The tool groups objects by type and renders each statement so you can read column definitions, types, default values and constraints verbatim.
For each table it also scans the statement for REFERENCES clauses and shows a foreign-key count, giving a quick sense of how tables relate. Internal objects whose names start with sqlite_ are filtered out so the view stays focused on the schema you authored.
What you can read from the schema
A CREATE TABLE statement in SQLite preserves the complete column specification including:
- Column names and declared types (note: SQLite is loosely typed, so these are advisory)
PRIMARY KEYdesignations and whether they areAUTOINCREMENTNOT NULLconstraintsDEFAULTvalues including expressions likeCURRENT_TIMESTAMPUNIQUEconstraints both inline and as table-level constraintsCHECKexpressionsFOREIGN KEY ... REFERENCESclauses (if foreign key enforcement is on)
Indexes appear as separate CREATE INDEX statements showing which columns are covered and whether the index is UNIQUE. Views show the query they encapsulate. Triggers show their event (BEFORE/AFTER, INSERT/UPDATE/DELETE) and the action SQL.
Common uses
Reverse-engineering an app’s data model. Many mobile apps and desktop tools embed a SQLite database. Dropping the .db file here reveals the full schema without needing the app’s source code.
Reviewing a migration. After running a migration script, open the updated database and verify that the new columns, indexes, and constraints were applied exactly as intended.
Documenting a data model. The unmodified CREATE statements are the most precise documentation of the schema — more reliable than hand-written notes.
Finding missing indexes. Scan the index list and check whether heavily queried columns have covering indexes. A table with many foreign keys and no indexes on those columns is a common performance problem.
Tips and notes
- The
CREATEstatements are shown unmodified, so anyCHECKconstraints,DEFAULTvalues andCOLLATEclauses are preserved. - A high foreign-key count on a table usually marks it as a join or fact table in the data model.
- To inspect the actual data behind the schema, use the SQLite Database Viewer or export with the SQLite to CSV exporter.
Everything runs locally in your browser — no upload, no account, read-only.