SQLite to ER Diagram
Paste your SQLite schema — the output of .schema — and get an interactive ER diagram of every table, column and relationship.
How it works
- In the
sqlite3shell run.schema(or.schema --indent) and copy the output. - Paste it into the editor — SQLite is parsed automatically.
- Tables render with columns;
REFERENCESbecome relations. - Arrange, hide tables, then export PNG/SVG or share a link.
Example
A SQLite schema like this:
CREATE TABLE customers ( id INTEGER PRIMARY KEY AUTOINCREMENT, email TEXT NOT NULL UNIQUE ); CREATE TABLE orders ( id INTEGER PRIMARY KEY AUTOINCREMENT, customer_id INTEGER NOT NULL REFERENCES customers(id) );
…renders two tables with a relation from orders.customer_id → customers.id. Try it with your own →
Guide
SQLite is the easiest dialect to diagram because the database itself can print the schema: open your file with sqlite3 app.db and run .schema. Copy everything — the output is exactly the CREATE TABLE / CREATE INDEX statements this tool parses, including the inline REFERENCES customers(id) column constraints SQLite favours.
Things worth knowing:
- Foreign keys may be missing from the DDL. Many SQLite schemas rely on naming convention instead of declared constraints. Paste the schema, then use Infer links to draw edges for
user_id-style columns. PRAGMA foreign_key_list(t);is a quick way to double-check which relations the database itself knows about, if the diagram looks sparser than expected.- Quirks like
INTEGER PRIMARY KEY AUTOINCREMENT,WITHOUT ROWID,ON CONFLICTclauses and double-quoted identifiers all parse.
This is a handy step when documenting an app that ships an embedded database — Electron apps, mobile apps, local-first tools. Render the diagram once, export an SVG, and commit it next to the migration files so the picture can't drift from reality.
Why use it
- Private: everything runs in your browser — nothing is uploaded or stored on a server.
- Interactive: drag tables, auto-arrange, hide noise, add notes, and manually link columns.
- Export a high-res PNG, vector SVG, or the schema as Mermaid / DBML / PlantUML code.
- Free & open source — no account, no sign-up.
FAQ
How do I diagram a SQLite database?
Open it with sqlite3 mydb.db, run .schema, and paste the output here. The diagram is generated instantly.
Is my schema uploaded anywhere?
No. Everything runs locally in your browser — your schema is never uploaded to or stored on any server.
Can I export the diagram?
Yes — export a high-resolution PNG or vector SVG, copy the schema as Mermaid, DBML or PlantUML, or share a link that encodes the whole diagram in the URL.
Is it free?
Yes. It is completely free and open source, with no account or sign-up required.