AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do I create an ERD from SQL?

Paste SQL DDL (CREATE TABLE statements) into AnyTool and it instantly draws an entity-relationship diagram with crow's-foot cardinality and PK/FK badges. You can drag tables, edit the schema, and export PNG or SVG — all in your browser with no upload.

  • Paste SQL DDL → instant ERD across MySQL/PostgreSQL/SQLite/SQL Server
  • Crow's-foot cardinality (1:1, 1:N, N:M) with PK/FK badges
  • Drag-to-move tables, zoom/pan, and manual editing
  • Export PNG/SVG and a shareable URL
  • 100% in-browser — no upload, no table caps

What is

Entity-Relationship Diagram

An entity-relationship diagram (ERD) visually models a database schema, showing each table as an entity with its columns and drawing relationships (one-to-one, one-to-many, many-to-many) between them, typically using crow's-foot notation.

Developer Tools

Related terms

ERDDatabase SchemaCrow's Foot NotationForeign KeySQL DDL

Frequently Asked Questions

Yes — paste CREATE TABLE statements and the ERD is drawn instantly.

It parses SQL DDL across MySQL, PostgreSQL, SQLite, and SQL Server, reading both inline REFERENCES and table-level FOREIGN KEY constraints (and inferring relationships from *_id naming) to draw entities and crow's-foot relationship lines automatically.

Yes — drag tables, edit the schema, and export PNG or SVG.

After import you can move tables, zoom and pan, edit table and column names and types, and export the result as PNG or SVG, with the diagram state encoded in a shareable URL — no account needed.

Yes — free, no signup, no table cap, and your schema never leaves the browser.

Unlike paywalled diagram tools with table limits or server-side AI, this runs entirely client-side, so sensitive production DDL stays on your device and it works offline after first load.

Detailed Explanation

Methodology

How the ERD Diagram Tool Works

AnyTool parses SQL DDL with node-sql-parser (per-dialect for MySQL, PostgreSQL, SQLite, and SQL Server) to build a table model, reading both inline column REFERENCES and table-level FOREIGN KEY constraints and inferring relationships from *_id naming. It then draws an interactive entity-relationship diagram with crow's-foot cardinality (1:1, 1:N, N:M) and PK/FK badges on a canvas that supports drag-to-move, zoom/pan, and manual schema editing. A forgiving regex fallback still renders dirty or partial SQL, and diagrams export to PNG/SVG with state encoded in a shareable URL.

  • SQL DDL to ERD across multiple dialects
  • Inline and table-level foreign keys, plus *_id inference
  • Crow's-foot cardinality with PK/FK badges
  • Drag-to-move, zoom/pan, and manual editing
  • PNG/SVG export and shareable URL with regex fallback
Privacy & Security

Privacy and Offline Use

Parsing and rendering run entirely client-side with the parser self-hosted and no runtime CDN, so sensitive production DDL never leaves the browser — unlike paywalled or server-side AI diagram tools — and there are no table caps. Diagram state is encoded in the URL hash, so sharing needs no server.

ERD Diagram: AnyTool vs typical tools
CapabilityAnyToolTypical tools
SQL DDL importYesVaries
Manual editing tooYesOften one or the other
Processing locationIn-browserOften server-side
Table cap / signupNoneOften gated
Works offlineYesNo

Capabilities reflect the live AnyTool tool; competitor behavior varies by service.