SQL & Databases

DBML / ERD Viewer

Render DBML as an entity-relationship diagram and convert it to SQL.

  • History kept on this deviceRecent results are kept in this browser's local storage until you clear them.
  • Runs in your browserProcessing happens in this page. No application server receives your input.

DBML or SQL DDL input

Entity-relationship diagram

Converted output

What this tool does

Renders DBML as an entity-relationship diagram via Mermaid, and converts between DBML and dialect-quoted CREATE TABLE statements for PostgreSQL, MySQL, SQLite, DuckDB, and SQL Server.

Limits

The diagram is structural: tables, columns, keys, and relationships. It does not lay out by hand, does not route edges around boxes, and on a schema past roughly forty tables Mermaid's automatic layout becomes something to scroll rather than something to read, the tool says so above that count rather than letting the user conclude it is broken. Enums, table groups, and notes are converted but not drawn. SQLโ†’DBML reads DDL only, with the same scope as DDL to Types.

Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.