PRIMARY KEY
Mark any column as the primary key directly in the diagram. The generated SQL includes the PRIMARY KEY constraint automatically.
SQL Designer is a free, browser-based ERD tool for MySQL and PostgreSQL. Here is everything it can do.
Place and reposition tables freely on an infinite canvas. Pan and zoom to work with schemas of any size without losing track of structure.
Add as many tables as you need. Each table holds any number of columns with a name, data type, and optional constraints. Rename and reorder on the fly.
Choose from all common MySQL and PostgreSQL data types: INT, BIGINT, VARCHAR, TEXT, BOOLEAN, DATE, TIMESTAMP, UUID, DECIMAL, JSON, and more.
Every change is saved automatically to your account. Close the browser, switch devices, come back later — your work is exactly where you left it.
Draw lines between columns to define foreign key constraints. Relationships are visualised with crow's foot (chicken-foot) notation so cardinality is immediately clear.
Mark any column as the primary key directly in the diagram. The generated SQL includes the PRIMARY KEY constraint automatically.
Toggle UNIQUE and NOT NULL constraints per column with a checkbox. No DDL to write — the SQL is generated correctly for you.
Generate a complete MySQL CREATE TABLE script for your entire schema — column definitions, data types, constraints, and foreign keys included. Ready to paste into MySQL Workbench, DBeaver, or a terminal.
Switch to PostgreSQL dialect and export a schema script compatible with psql, pgAdmin, Supabase, or any Postgres-compatible tool. The same diagram, the right syntax.
Copy the full generated SQL to your clipboard with a single click. No file to download, no extra steps.
Sign up with your email address. No credit card, no subscription, no trial — all features are available immediately after registration with no expiry.
Create unlimited diagrams — one per project, microservice, or database. All are saved to your account and accessible from any device.
SQL Designer runs entirely in your browser. Open sql-designer.com in Chrome, Firefox, Safari, or Edge and start designing — no download, no extension, no setup.