SQL to ER Diagram
Home › SQLite

SQLite to ER Diagram

Paste your SQLite schema — the output of .schema — and get an interactive ER diagram of every table, column and relationship.

Open the diagram tool →
No signup · nothing uploaded · export PNG / SVG / Mermaid / DBML · shareable link
ER diagram of the SQLite example schema: customers and orders (2 tables, 1 relationship)
The SQLite example below, drawn by the tool: customers and orders (2 tables, 1 relationship).

At a glance

What it is
SQL to ER Diagram is a free, open-source browser tool that turns a SQLite schema into an interactive entity-relationship (ER) diagram.
Input
SQLite CREATE TABLE statements, such as the output of .schema.
Output
An interactive ER diagram you can rearrange, then export as PNG, SVG, Mermaid, DBML or PlantUML, or share as a link.
Cost
Free. MIT-licensed open source. No account or signup.
Privacy
Runs entirely in your browser. The schema is never uploaded, and share links carry the diagram in the URL fragment, which is not sent to a server.
Limits
It never connects to your database itself: you paste schema text, or run one read-only catalog query in your own client and paste the result. There are no accounts, so there is no real-time multi-user editing; diagrams are kept in your browser, as a saved file, or as a share link. Layout stays smooth at around 300 tables.

How it works

  1. In the sqlite3 shell run .schema (or .schema --indent) and copy the output.
  2. Paste it into the editor — SQLite is parsed automatically.
  3. Tables render with columns; REFERENCES become relations.
  4. 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:

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

SQLitePostgreSQLMySQLSQL Server

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.

Related