ER Diagram Generator
A free online ER diagram generator. Paste your SQL — CREATE TABLE statements or a full DDL dump — and instantly generate an interactive entity-relationship diagram with every table, column and foreign key drawn for you.
How it works
- Copy your SQL schema (PostgreSQL, MySQL, SQLite, SQL Server, Oracle, Snowflake…).
- Paste it into the generator — the dialect is detected automatically.
- The ER diagram is generated instantly: tables with columns, and foreign keys as relations.
- Arrange, hide tables, then export PNG/SVG or convert to Mermaid/DBML/PlantUML.
Example
Paste SQL like this:
CREATE TABLE authors ( id BIGINT PRIMARY KEY, name VARCHAR(120) NOT NULL ); CREATE TABLE books ( id BIGINT PRIMARY KEY, author_id BIGINT NOT NULL REFERENCES authors(id), title VARCHAR(200) );
…and the generator draws two tables with a relation from books.author_id → authors.id. Try it with your own →
Guide
This is the general-purpose entry point: paste SQL from any of the supported dialects — PostgreSQL, MySQL/MariaDB, SQLite, SQL Server, Oracle, Snowflake, BigQuery — and the generator detects the dialect, draws every table with its columns and keys, and connects foreign keys as relations. Dumps are fine: pg_dump --schema-only, mysqldump --no-data, SSMS scripts, .schema output — noise statements are skipped, ALTER TABLE foreign keys are stitched back on.
Getting a good diagram out
- Start with auto-arrange, then drag clusters apart by domain — the layout is a first draft, not a verdict.
- Hide tables you don't need; a 25-table diagram communicates more than a 200-table one.
- No foreign keys in the schema? Use Infer links — it draws relations from
user_id-style column conventions. - Export SVG for docs (scales forever), PNG for slides and tickets.
Everything happens in your browser — the schema is parsed and rendered locally, and never uploaded. That's not a limitation; it's the feature that makes pasting a production dump unremarkable.
Why use it
- Private: everything runs in your browser — nothing is uploaded or stored on a server.
- Any SQL dialect — Postgres, MySQL, SQLite, SQL Server, Oracle, Snowflake, BigQuery.
- 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 generate an ER diagram from SQL?
Paste your CREATE TABLE statements (or a schema dump) and the ER diagram is generated instantly — tables become entities and foreign keys become relations. No signup, nothing uploaded.
Which databases does the generator support?
PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, Snowflake and BigQuery DDL, plus Prisma, DBML, Mermaid, SQLAlchemy and Sequelize.
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.