SQL to ER Diagram
Home › SQL to PlantUML

SQL to PlantUML

Paste your SQL CREATE TABLE statements and get a PlantUML entity diagram you can drop into your docs or wiki — plus a live, interactive diagram to check it first.

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

At a glance

What it is
SQL to ER Diagram is a free, open-source browser tool that turns SQL CREATE TABLE statements into a PlantUML entity diagram.
Input
SQL CREATE TABLE statements for PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle or Snowflake.
Output
PlantUML entity-diagram code to copy, alongside a live interactive diagram.
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. Paste your SQL schema into the editor (PostgreSQL, MySQL, SQLite, SQL Server, Oracle…).
  2. The diagram renders instantly so you can verify it.
  3. Click Export → PlantUML and copy the @startuml block.
  4. Paste it into any PlantUML renderer, Confluence, or your docs.

Example

This SQL:

CREATE TABLE teams (
  id INT PRIMARY KEY,
  name VARCHAR(80) NOT NULL
);
CREATE TABLE players (
  id INT PRIMARY KEY,
  team_id INT REFERENCES teams(id),
  nickname VARCHAR(40)
);

…exports as this PlantUML:

@startuml
hide circle
skinparam linetype ortho

entity "teams" as teams {
  * id : int <<PK>>
  --
  name : varchar(80)
}

entity "players" as players {
  * id : int <<PK>>
  --
  team_id : int <<FK>>
  nickname : varchar(40)
}

teams ||--o{ players
@enduml

Copy it from Export → PlantUML. Try it with your own →

Guide

The export produces a classic PlantUML entity diagram: each table becomes an entity block with a *-marked primary key and typed fields, and each foreign key becomes a crow's-foot connector (users ||--o{ posts). It's the notation your Confluence, XWiki, AsciiDoc or Doxygen setup already renders — no new toolchain to adopt.

Where people take the output:

The difference from generating PlantUML by hand or with a script: the live diagram here verifies the relationships before you commit the artifact. A wrong join shows up as a wrong crow's-foot immediately. And if PlantUML turns out to be the wrong target — your docs move to Markdown, say — the same parse exports Mermaid and DBML too. One paste, three notations, all client-side.

Why use it

SQL → PlantUMLSQL → MermaidSQL → DBMLPNG / SVG

FAQ

How do I convert SQL to PlantUML?

Paste your CREATE TABLE statements, then click Export → PlantUML and copy the @startuml block. Foreign keys become relationship connectors.

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.

Related