Convert SQL to ERD Instantly
Paste your CREATE TABLE statements and see the ER diagram drawn on the canvas right away. No signup, no installation.
Paste SQL on the left and click Convert to see your ERD here
How to convert SQL to an ERD
- Paste your CREATE TABLE statements into the input box. To see a result first, click "Load sample SQL".
- Click "Convert" and the tables, columns, primary keys, and foreign key relationships are drawn on the canvas as an ER diagram.
- Statements that could not be parsed are listed as warnings. To save the ERD as a project and extend it with AI, sign up for free and continue in the editor.
Which SQL can I convert?
CREATE TABLE statements for PostgreSQL, MySQL, SQLite, and Microsoft SQL Server. Foreign keys declared with column-level REFERENCES, table-level FOREIGN KEY constraints, or ALTER TABLE ... ADD FOREIGN KEY all become relationships, and CREATE INDEX statements and table or column comments are read as well. You can paste SQL wrapped in a ```sql code block as is.
Is my SQL sent to a server?
No. The SQL is parsed in your browser and is not sent to or stored on our servers. Usage statistics only record whether a conversion succeeded and how many tables it produced. No sign-up is required.
Are there statements that are not converted?
The diagram shows tables, columns, keys, and relationships only. Views, triggers, stored procedures, and data statements such as INSERT are not converted and are ignored. If part of a table definition cannot be parsed, the warning list shows which statement it was.
What can I do after converting?
After signing up, you can save the ERD as a project in the editor and edit it with your team in real time. You can export it as SQL DDL for PostgreSQL, MySQL, SQLite, or SQL Server, as code for 8 ORMs such as Prisma and TypeORM, or as a PNG or SVG image.