Paste SQL DDL or upload a .sql file to generate an ER diagram. Best support is for common CREATE TABLE,PRIMARY KEY, and FOREIGN KEY patterns.
Need more than a template?
I build internal tools, integrations and full-stack products for startups and growing teams.
Full-stack engineering →Paste SQL or upload a .sql file and the tool draws the tables and the relationships between them as an entity-relationship diagram. It reads CREATE TABLE statements, primary keys and foreign keys, including foreign keys added later with ALTER TABLE. The SQL itself stays in your browser. Only the diagram library, Mermaid, is fetched from a public CDN the first time the page draws a diagram.
CREATE TABLE users (id UUID PRIMARY KEY, email VARCHAR(255) NOT NULL);
CREATE TABLE projects (id UUID PRIMARY KEY, owner_id UUID REFERENCES users(id));
CREATE TABLE tasks (id UUID PRIMARY KEY, project_id UUID REFERENCES projects(id));One user owns many projects, and one project has many tasks. The diagram draws both lines.
Common CREATE TABLE syntax works. Vendor-specific extensions, partitioning clauses and tables created by procedures may be missed, and the tool reports when it finds nothing.
A diagram is only as useful as the relationships in the SQL. Schemas that rely on application code to link tables, with no REFERENCES, show tables with no lines.
The tool drops schema prefixes, so public.users and audit.users are read as one table called users. If your database reuses names across schemas, paste one schema at a time.
Data statements are ignored, but a large dump can still be slow to read. Export the schema only.