PostgreSQL to ER Diagram
Paste your PostgreSQL schema — CREATE TABLE statements or a pg_dump — and get an interactive ER diagram with every table, column and foreign key drawn for you.
How it works
- Dump the schema with
pg_dump --schema-only your_db, or copy yourCREATE TABLEstatements. - Paste it into the editor — Postgres is parsed automatically, including
ALTER TABLE … ADD CONSTRAINTforeign keys. - Tables render with columns and types; relations are drawn from the constraints.
- Arrange, hide tables, then export PNG/SVG or share a link.
Example
A PostgreSQL schema like this:
CREATE TABLE customers ( id SERIAL PRIMARY KEY, email TEXT NOT NULL UNIQUE ); CREATE TABLE orders ( id SERIAL PRIMARY KEY, customer_id INTEGER NOT NULL REFERENCES customers(id) );
…renders two tables with a relation from orders.customer_id → customers.id. Try it with your own →
Why use it
- Private: everything runs in your browser — nothing is uploaded or stored on a server.
- pg_dump-friendly — handles
ALTER TABLE ONLY … ADD CONSTRAINTforeign keys. - 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 turn a Postgres database into an ER diagram?
Run pg_dump --schema-only and paste the output. Tables and foreign keys (including those added via ALTER TABLE) are drawn automatically.
Does it support pg_dump?
Yes — pg_dump emits foreign keys as separate ALTER TABLE statements, which are parsed and turned into relations.
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.