SQL Server to DBML
Convert SQL Server DDL to DBML for dbdiagram.io and dbdocs.
Real SQL Server scripts
SSMS Generate Scripts, EF Core / Flyway migrations and hand-written DDL – brackets, schemas, GO, ALTER TABLE constraints.
Crow’s foot relations
One-to-one, one-to-many, optional and mandatory ends, self references and many-to-many link tables.
Export in one click
PNG / SVG for documents, Mermaid, DBML, PlantUML, Markdown and HTML data dictionaries.
Thai & English
Thai table and column descriptions (MS_Description) are shown in the diagram and the data dictionary.
How to use
- Paste your SQL Server script.
- Copy the DBML code or download a .dbml file.
- Drag tables, zoom with the mouse wheel, click a table to see its columns and relations.
- Export PNG / SVG / Mermaid / DBML or share a read-only link.
Frequently asked questions
How do I get a script of my database?
In SQL Server Management Studio right-click the database › Tasks › Generate Scripts, choose the tables and “Schema only”. Azure Data Studio and EF Core migrations work too.
My script has no FOREIGN KEY constraints.
Keep “Guess relations” on: columns such as CustomerID or customer_id are linked to the table Customers when the types match. Guessed lines are dashed.
What do the line ends mean?
Crow’s foot notation: two bars = exactly one, circle + bar = zero or one, crow’s foot = many. A nullable foreign key makes the parent end optional.
Is my script stored?
No. It is parsed in memory and discarded. It is stored only when you save it to your Library or create a share link.
How big can a script be?
Guests: 2 MB (hundreds of tables). Signed in: 50 MB. Diagrams with hundreds of tables stay smooth – use “Keys” or “Names” for the big picture.