Where DDL actually comes from
Most people don't sit down and write a clean CREATE TABLE script by hand — DDL shows up as a byproduct of something else. An ORM generates it as a migration. A DBA exports it with pg_dump --schema-only or mysqldump --no-data before a deploy. A teammate pastes the output of SHOW CREATE TABLE into a Slack thread. None of that is tidy, and none of it needs to be before you paste it here.
The parser is deliberately tolerant: unrelated statements — indexes, grants, comments, inserts — are recognized and skipped rather than treated as errors, and one malformed statement in a large file doesn't stop the rest from rendering. Paste the whole thing; it sorts out what matters.
What you get back
An interactive, pannable ER diagram with tables grouped by how they actually reference each other, relationship lines anchored to the specific foreign-key column, and 1 / 0..N cardinality badges inferred from your constraints — plus a plain-English summary and copy-ready sample JOIN queries. The full breakdown of the notation, the grouping logic, and every export format lives on the main SQL Schema Visualizer page.
Frequently asked questions
What counts as DDL here?
CREATE TABLE and ALTER TABLE statements — the ones that define columns, primary keys, and foreign keys. Everything else in a typical migration or dump (CREATE INDEX, INSERT, GRANT, COMMENT ON, and so on) is recognized and silently skipped rather than flagged as an error, so you can paste a whole file without cleaning it up first.
Can I paste an entire migration file, not just one CREATE TABLE?
Yes — that is the common case. Each statement is parsed independently, so if one table definition has a typo, the rest of the file still parses and renders; the problem is reported with its line number rather than blocking everything else.
Does it matter which database the DDL came from?
The dialect is auto-detected from the DDL text — PostgreSQL, MySQL, SQL Server, SQLite, and BigQuery are all supported, including each one's quirks like dollar-quoted function bodies, backtick identifiers, bracketed names, or IDENTITY columns.
Is this the same tool as the main Schema Visualizer?
Yes — this page is a focused entry point for people who already have a DDL script in hand. The full tool, including the notation guide and every export option, lives at the Schema Visualizer.
Related tools
- SQL Schema Visualizer — the full tool: notation guide, grouping, Insights, and every export option.
- SQL to ER Diagram Generator — the same tool, framed around generating a diagram rather than reading in a file.
- Format SQL Online — tidy up the DDL first if it's hard to read.
- Back to Unformat.online homepage