PostgreSQL ER Diagram Tool
Paste SQL or connect to your PostgreSQL database. See tables, columns, and foreign keys as an interactive ER diagram in seconds.
Paste SQL or Connect
Live Preview
Export SVG/PNG
Two ways to visualize your schema
Paste SQL for a quick preview, or connect to your live database for the full picture.
id uuid PRIMARY KEY,
name varchar(255) NOT NULL,
email varchar(255) UNIQUE
};
CREATE TABLE posts {
id uuid PRIMARY KEY,
user_id uuid REFERENCES users(id),
title text,
created_at timestamptz
};
What the diagram shows
- All tables in your database with their columns and data types
- Primary keys highlighted on each table
- Foreign keys drawn as lines connecting related tables
- Nullable columns marked so you can see optional relationships
Frequently asked questions
What is a PostgreSQL ER diagram?
An entity-relationship diagram (ERD) for PostgreSQL shows your tables, columns, data types, primary keys, and foreign keys as a visual map. It helps you understand how your database is structured and how tables relate to each other.
How do I generate an ER diagram from PostgreSQL?
Copy your PostgreSQL connection string from your database provider (Supabase, Neon, Railway, AWS RDS, etc.) and paste it into dbdiagramr. The tool reads your schema and generates an interactive ER diagram in under 10 seconds.
Does this work with Supabase, Neon, and Railway?
Yes. dbdiagramr works with any managed PostgreSQL provider. For Supabase, use the Session pooler connection string (port 5432). For Neon, use the pooled connection string. For Railway, use the standard PostgreSQL connection string.
Is my database connection secure?
Yes. dbdiagramr connects to your database to read the schema (tables, columns, foreign keys) and immediately discards the connection string. Your data is never stored, logged, or shared.
Can I export the ER diagram?
Yes. Export your diagram as PNG or SVG. You can also zoom, pan, and hover over tables to trace foreign key relationships interactively.
Generate your PostgreSQL ER diagram now
Paste your PostgreSQL connection string and get an interactive ER diagram in under 10 seconds. No signup required.
Try it free →