FREE TOOL

SQL to ER Diagram Generator

Paste SQL here - connect GitHub when you want Moxie to keep data-model docs accurate.

Live Mermaid ER preview, SVG/PNG export, and shareable links in your browser. Optional AI docs for a full data-model writeup. No account needed for the diagram.

Prefer hand-written Mermaid? Open the live diagram editor
SQL → ER4 tables
Parsing and rendering stay in your browser. AI schema docs need a quick email unlock.

Paste SQL to generate an ER diagram.

Export SVG/PNG for docs and slides, or copy Mermaid into a README.

Tired of redrawing ER diagrams after every migration? Export free above · connect a repo when you want Moxie to keep it accurate

Instant ER from SQL

Paste Postgres, MySQL, or SQLite CREATE TABLE statements and get a Mermaid erDiagram with relationships and keys.

Export anywhere

Download clean SVG or PNG for docs and slides, or copy Mermaid into a README. Shareable links too.

AI data model docs

Optional: turn the same schema into Markdown documentation - overview, tables, and relationships.

Private by design

SQL parsing and diagram rendering run in your browser. Schema never leaves your device unless you ask for AI docs.

Common uses

Onboarding & design reviews

Drop migration SQL into a shareable ER diagram for PRs and architecture reviews.

README & wiki diagrams

Export SVG or paste Mermaid into docs so the schema is visible without a DB client.

Data model documentation

Use Document with AI for a Markdown writeup of tables and relationships.

Async collaboration

Share a link with SQL and Mermaid encoded in the URL - no accounts, no uploads.

Frequently asked questions

Is this SQL to ER diagram generator free?

Yes. Paste SQL, preview the ER diagram, export SVG/PNG, and share links with no account. Generating AI data model docs asks for an email once so we can keep the tool abuse-free.

Which SQL dialects are supported?

Common CREATE TABLE syntax from Postgres, MySQL, and SQLite - including PRIMARY KEY, FOREIGN KEY, REFERENCES, UNIQUE, and NOT NULL. Complex migrations or vendor-only types may need a quick Mermaid edit.

Does my SQL leave my browser?

Diagram generation is fully client-side. Only when you choose Document with AI do we send a schema summary to generate Markdown docs - and we do not store your SQL dump.

Can I edit the Mermaid after it is generated?

Yes. Switch to the Mermaid tab to tweak relationships or labels. Edits stick until you change the SQL again. Shareable links include your overrides.

How is this different from dbdiagram.io or similar tools?

This tool focuses on pasting real CREATE TABLE SQL, Mermaid output you can commit to docs, private in-browser rendering, and a path into living architecture docs from GitHub when you connect a repo.

How do I keep schema diagrams accurate over time?

A one-off ER diagram drifts the moment migrations land. Moxie Docs connects to your repository and keeps architecture and data-model docs current on every merge - with reviewable Cleanup PRs.

For teams that document code

Tired of redrawing ER diagrams after every migration?

Generate a diagram from SQL here. Connect GitHub when you want Moxie to keep architecture and data-model docs accurate as the schema changes - with reviewable Cleanup PRs every Friday.

Export free above · connect a repo when you want Moxie to keep it accurate