SQL to ER Diagram
Home › MariaDB

MariaDB to ER Diagram

Paste your MariaDB CREATE TABLE statements (or a mysqldump) and get an interactive entity-relationship diagram — tables, columns, keys and foreign keys, drawn automatically.

Open the diagram tool →
No signup · nothing uploaded · export PNG / SVG / Mermaid / DBML · shareable link
ER diagram of the MariaDB example schema: users and posts (2 tables, 1 relationship)
The MariaDB example below, drawn by the tool: users and posts (2 tables, 1 relationship).

At a glance

What it is
SQL to ER Diagram is a free, open-source browser tool that turns a MariaDB schema into an interactive entity-relationship (ER) diagram.
Input
MariaDB CREATE TABLE statements, or the output of mysqldump --no-data.
Output
An interactive ER diagram you can rearrange, then export as PNG, SVG, Mermaid, DBML or PlantUML, or share as a link.
Cost
Free. MIT-licensed open source. No account or signup.
Privacy
Runs entirely in your browser. The schema is never uploaded, and share links carry the diagram in the URL fragment, which is not sent to a server.
Limits
It never connects to your database itself: you paste schema text, or run one read-only catalog query in your own client and paste the result. There are no accounts, so there is no real-time multi-user editing; diagrams are kept in your browser, as a saved file, or as a share link. Layout stays smooth at around 300 tables.

How it works

  1. Dump your schema with mysqldump --no-data your_db (MariaDB ships the same client), or copy your CREATE TABLE statements.
  2. Paste it into the editor — the SQL is parsed automatically.
  3. Every table renders with its columns; FOREIGN KEY constraints become relations.
  4. Arrange, hide tables, then export PNG/SVG or share a link.

Example

A MariaDB schema like this:

CREATE TABLE users (
  id INT AUTO_INCREMENT PRIMARY KEY,
  email VARCHAR(255) NOT NULL UNIQUE
) ENGINE=InnoDB;

CREATE TABLE posts (
  id INT AUTO_INCREMENT PRIMARY KEY,
  user_id INT,
  FOREIGN KEY (user_id) REFERENCES users(id)
) ENGINE=InnoDB;

…renders two tables with a relation from posts.user_id → users.id. Try it with your own →

Guide

MariaDB speaks MySQL's DDL dialect, so everything on the MySQL path works identically: mysqldump --no-data (the MariaDB client ships the same tool), paste, done. The parser additionally tolerates MariaDB-specific syntax you'll hit in the wild: UUID() column defaults, DEFAULT (UUID()) expressions, SYSTEM VERSIONED temporal tables, and the json type (which is an alias for LONGTEXT under the hood — shown as json on the diagram, as you'd expect).

Storage-engine table options (ENGINE=Aria, ENGINE=ColumnStore, ENGINE=InnoDB) are ignored gracefully — they don't belong on an ER diagram anyway. If you're migrating MariaDB → PostgreSQL and want a before/after picture, diagram both sides and export matching SVGs; the visual diff of missing relations is often faster to read than any schema-diff tool output.

And as with MySQL: schemas without declared foreign keys (relations enforced in app code) still diagram fine — use Infer links to draw the _id conventions as edges.

Why use it

MariaDBMySQLPostgreSQLSQLite

FAQ

Does it work with MariaDB dumps?

Yes — MariaDB uses the same CREATE TABLE / mysqldump syntax as MySQL. Paste the schema dump and tables + foreign keys are drawn instantly.

Is my schema uploaded anywhere?

No. Everything runs locally in your browser — your schema is never uploaded to or stored on any server.

Can I export the diagram?

Yes — export a high-resolution PNG or vector SVG, copy the schema as Mermaid, DBML or PlantUML, or share a link that encodes the whole diagram in the URL.

Is it free?

Yes. It is completely free and open source, with no account or sign-up required.

Related