Tolerant parser
Reads inline and trailing PRIMARY KEY and FOREIGN KEY constraints across multiple CREATE TABLE blocks.
Paste one or more CREATE TABLE statements and get a laid-out SVG ER diagram, complete with primary keys, foreign key tags and relationship arrows.
Parsing and rendering happen locally — nothing you paste is sent anywhere.
Reads inline and trailing PRIMARY KEY and FOREIGN KEY constraints across multiple CREATE TABLE blocks.
Every foreign key gets an arrow pointing to the table and column it references.
Export the diagram as a standalone .svg file you can drop into docs or a design tool.
Turn raw DDL into a diagram you can actually show someone.
Each table becomes one rounded box listing its columns in the order they were declared. A handful of small markers carry most of the meaning, so the diagram stays readable even for a schema with a dozen tables.
Primary key columns are shown in bold with a PK tag, whether they were declared inline or in a trailing PRIMARY KEY (...) constraint.
Foreign key columns carry an FK tag, detected from an inline REFERENCES clause or a trailing FOREIGN KEY (...) REFERENCES constraint.
An arrow runs from each foreign key column to the primary key row of the table it references, when that table is present in the diagram.
Tables are arranged left to right in rows of three, in the order they appear in your SQL, sized to fit each one's own column list.
Questions about parsing, layout and exporting.
It looks for CREATE TABLE name ( ... ) blocks, then reads each comma-separated column definition inside. It recognizes inline PRIMARY KEY and REFERENCES, as well as trailing PRIMARY KEY (col) and FOREIGN KEY (col) REFERENCES table(col) constraints. It is intentionally tolerant rather than a full SQL parser, so most dialects of MySQL, PostgreSQL and SQLite CREATE TABLE syntax will work.
The referencing column is still tagged FK in its table box, but no arrow is drawn since there is no matching table box to point to. Paste all related CREATE TABLE statements together to see every relationship line.
Tables are placed left to right in rows of three in the order they appear in your SQL, with each box sized to fit its own column list. This keeps the layout simple and predictable rather than trying to minimize crossing lines.
Not directly in this tool, but the downloaded SVG file is plain text markup that opens in any vector editor, such as Inkscape or Figma, for further styling or layout changes.
No. Parsing and diagram rendering happen entirely in your browser. Nothing you paste here is stored or transmitted.