DDL to ER Diagram
Paste your database DDL — the CREATE TABLE and ALTER TABLE statements that define your schema — and get an interactive ER diagram with every table, column and foreign key drawn automatically.
How it works
- Copy your DDL from a migration, schema dump, or your database client.
- Paste it into the editor — PostgreSQL, MySQL, SQLite, SQL Server, Oracle and Snowflake DDL all parse.
- Tables render with columns; inline
REFERENCESandFOREIGN KEYconstraints become relations. - Arrange, hide tables, then export PNG/SVG or convert to Mermaid/DBML.
Example
DDL 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 ); ALTER TABLE books ADD CONSTRAINT fk_books_authors FOREIGN KEY (author_id) REFERENCES authors(id);
…renders two tables with a relation from books.author_id → authors.id, including the ALTER TABLE foreign key. Try it with your own →
Why use it
- Private: everything runs in your browser — nothing is uploaded or stored on a server.
- Dialect-agnostic — paste DDL from any major database.
- 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
What counts as DDL?
Data Definition Language — the CREATE TABLE, ALTER TABLE and constraint statements that define your schema. Paste them and the diagram is drawn instantly.
Does it read ALTER TABLE foreign keys?
Yes — foreign keys added via ALTER TABLE … ADD CONSTRAINT … FOREIGN KEY (as pg_dump emits) are parsed and drawn as relations.
Is my schema uploaded anywhere?
No. Everything runs locally in your browser — your schema is never uploaded to or stored on any server.
Is it free?
Yes. It is completely free and open source, with no account or sign-up required.