Free · No sign-up · Nothing installed

PostgreSQL to ER Diagram

Paste your DDL or a raw pg_dump --schema-only dump — schemas, identity columns, and ALTER TABLE foreign keys all land where they belong.

SQL input — CREATE TABLE · DDL · dumppostgres
postgresSample: · ·
Diagram—

Your diagram renders here.

Parser coverage

What we parse in postgres

  • Schemas — public, auth, storage… grouped in labeled containers
  • Identity columns — SERIAL and GENERATED … AS IDENTITY render as PK-safe
  • Postgres types — jsonb, text[], timestamptz, numeric(12,2) shown verbatim
  • Separated FKs — ALTER TABLE … ADD FOREIGN KEY, the pg_dump way, reattached automatically
From your database

Get just the schema

pg_dump --schema-only dbname > schema.sql

Structure only, no data. Paste schema.sql above — no connection strings, no credentials.

FAQ

Questions, answered

How do I generate an ER diagram from a PostgreSQL schema?

Run pg_dump --schema-only, paste the output above — or paste CREATE TABLE statements directly.

Does it work with pg_dump output?

Yes, including dumps where foreign keys are added by separate ALTER TABLE statements.

Does it connect to my Postgres database?

No — and that's the point. No credentials, no network access to your DB; just paste the DDL.

Are Postgres schemas (namespaces) shown?

Yes — non-default schemas get their own labeled group in the diagram.

More converters

Also available