Erdmates Logo
Erdmates
Free tool · No signup

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

Mini Map
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

How to convert SQL to an ERD

  1. Paste your CREATE TABLE statements into the input box. To see a result first, click "Load sample SQL".
  2. Click "Convert" and the tables, columns, primary keys, and foreign key relationships are drawn on the canvas as an ER diagram.
  3. 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.

Related guides

  • The Complete SQL CREATE TABLE Guide with Real-World Examples
  • Mastering Foreign Keys and Table Relationships
  • What is an ERD? A Beginner's Guide to Database Design
  • The Complete Guide to Database Normalization: 1NF to 3NF
  • ERD Notation Comparison: Crow's Foot, UML, and Peter Chen
  • Try the ERD editor demo
  • Help center
Erdmates Logo
Erdmates

Design databases with natural language and collaborate in real-time with your team using our AI-powered ERD editor.

Service

  • Features
  • Pricing
  • Demo
  • SQL to ERD converter

Resources

  • Blog
  • Help
  • Contact Us

Legal

  • Terms of Service
  • Privacy Policy
  • Third-Party Provision
Company: Produx|Representative: 최정회
Address: 강원특별자치도 원주시 솔우물2길 4-1 (무실동)
Email: master@erdmates.com
Privacy Officer: 최정회|Hosting Provider: Amazon Web Services

© 2026 Produx. All rights reserved.