SQL to ER Diagram
Home › ER Diagram Generator

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.

Open the diagram tool →
No signup · nothing uploaded · export PNG / SVG / Mermaid / DBML · shareable link

How it works

  1. Copy your SQL schema (PostgreSQL, MySQL, SQLite, SQL Server, Oracle, Snowflake…).
  2. Paste it into the generator — the dialect is detected automatically.
  3. The ER diagram is generated instantly: tables with columns, and foreign keys as relations.
  4. 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_idauthors.id. Try it with your own →

Why use it

SQLPostgreSQLMySQLOracleSQL Server

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.

Related