- PostgreSQL & pg_dump
- Auto-layout
- Runs in your browser
- PNG · SVG · PDF · Mermaid
UML Diagram Maker: Turn SQL Into a Clear Database Diagram
Paste a PostgreSQL schema, drop in a .sql or pg_dump file, or build tables by hand, and this database diagram builder draws the entity relationship diagram for you. Foreign keys become connected lines in crow's foot notation, so students, backend developers and technical writers can explain a data model in minutes instead of redrawing boxes in a slide tool. Everything runs in your browser, so your schema is never uploaded, and you can export the result as PNG, SVG, PDF, Mermaid or SQL.
How to Create an UML Diagram From SQL in 6 Steps
No account and no install. This is the exact path from an empty canvas to a diagram you can share.
Load your schema
Click Import and paste your CREATE TABLE statements, or drop a .sql file up to 2 MB. No SQL yet? Press Add table in the Tables panel, or load the sample schema to see how it behaves.
pg_dump files work as they are
Describe every field
Pick a table, then set each field's name and Postgres type from the searchable list. Toggle PK, UQ, NULL and FK, and add a default such as now().
Enter adds the next field
Connect tables with foreign keys
Switch on FK for a field, then choose the target table and column. The relationship line appears at once. Click its label to write your own wording, such as owns or has many.
Lines update live
Arrange the layout
Drag tables by hand, or press LR (left to right) or TB (top to bottom) and let auto-layout place parent tables before their children. Turn on Snap to keep things aligned.
Your manual drags are kept
Style it for your audience
Open Properties to choose a light, dark, blueprint or minimal theme, change colors and edge style, hide types or badges, and add a text or image watermark.
Handy for assignments and reports
Export or save
Download a PNG (1x to 3x, optional transparent background), SVG, PDF, Mermaid erDiagram text, PostgreSQL CREATE TABLE SQL, or a JSON file you can import again.
Nothing is stored, so export JSON to continue later
How the Diagram Is Built From Your SQL
Every line on the canvas comes from a rule you can check yourself, so the picture stays a faithful copy of your schema rather than a guess.
Foreign key → line
A field whose foreign key points at an existing table and column becomes a relationship. If the target is not loaded yet, the key stays pending and the line appears the moment it arrives.
Cardinality
A foreign key on an ordinary column reads many-to-one (N-1). If that column is also a primary key or unique, it reads one-to-one (1-1).
Optional name matching
Turn on Infer to match columns like user_id with a users table that has an id. It is off by default because a naming guess is not a guarantee.
Layered layout
Auto-layout uses the ELK layered algorithm: referenced tables first, child tables after, and unconnected tables packed beside them without overlap.
Reading the notation (Mermaid code beside each symbol)
||--||One to one||--o{One to many}o--||Many to one}o--o{Many to many
Three Real Examples: What Goes In, What Comes Out.
Student
Blog database for a DBMS assignment
Input
Three tables (users, posts, comments) pasted as CREATE TABLE statements with REFERENCES.
Output
Three connected tables and three N-1 relationships, arranged left to right and exported as a PNG with the college name as a watermark.
Backend developer
Documenting a production dump
Input
A pg_dump file where foreign keys arrive through ALTER TABLE ... ADD CONSTRAINT, plus a CREATE TYPE enum.
Output
Constraints applied after all tables load, every relation drawn, and Mermaid erDiagram text ready to paste into a README.
Founder
Designing before writing code
Input
No SQL yet: tables built field by field in the form panel, with foreign keys chosen from dropdowns.
Output
A visual schema to review with the team, then generated PostgreSQL CREATE TABLE statements to start the migration.
Questions Worth Asking
The questions most tools don't answer honestly


