Database Schema Designer
Design tables with a real column grid, indexes and foreign keys, drag them around an entity-relationship diagram, and export CREATE TABLE DDL for PostgreSQL, MySQL or SQLite β plus DBML, PlantUML and the diagram as SVG.
Entity-relationship diagram
Drag a table to move it. Connectors use one-to-many crow's-foot notation: the bar marks the βoneβ side, the crow's foot the βmanyβ side. SVG export is vector, so it stays crisp at any size β no rasterisation step is needed.
| Name | Type | Length | Nullable | Default | PK | Unique | Auto | Comment | FK β table.column | |
|---|---|---|---|---|---|---|---|---|---|---|
PostgreSQL DDL
CREATE TABLE "users" (
"id" serial PRIMARY KEY NOT NULL,
"email" varchar(255) NOT NULL UNIQUE,
"created_at" timestamptz NOT NULL DEFAULT now()
);
CREATE UNIQUE INDEX "users_email_idx" ON "users" ("email");
CREATE TABLE "orders" (
"id" serial PRIMARY KEY NOT NULL,
"user_id" integer NOT NULL REFERENCES "users"("id"),
"total" numeric(10,2) NOT NULL DEFAULT 0,
"status" varchar(32) DEFAULT 'pending'
);
CREATE INDEX "orders_user_idx" ON "orders" ("user_id");MySQL DDL
CREATE TABLE `users` ( `id` INT AUTO_INCREMENT NOT NULL, `email` varchar(255) NOT NULL UNIQUE, `created_at` timestamptz NOT NULL DEFAULT now(), PRIMARY KEY (`id`), UNIQUE `users_email_idx` (`email`) ); CREATE TABLE `orders` ( `id` INT AUTO_INCREMENT NOT NULL, `user_id` integer NOT NULL REFERENCES `users`(`id`), `total` numeric(10,2) NOT NULL DEFAULT 0, `status` varchar(32) DEFAULT 'pending', PRIMARY KEY (`id`), `orders_user_idx` (`user_id`) );
SQLite DDL
CREATE TABLE "users" (
"id" INTEGER PRIMARY KEY,
"email" TEXT NOT NULL UNIQUE,
"created_at" TEXT NOT NULL DEFAULT now(),
UNIQUE "users_email_idx" ("email")
);
CREATE TABLE "orders" (
"id" INTEGER PRIMARY KEY,
"user_id" INTEGER NOT NULL REFERENCES "users"("id"),
"total" REAL NOT NULL DEFAULT 0,
"status" TEXT DEFAULT 'pending',
"orders_user_idx" ("user_id")
);DBML
Table users {
id serial [pk increment not null]
email varchar(255) [not null unique]
created_at timestamptz [default: `now()`] [not null]
indexes {
(email) [unique, name: 'users_email_idx']
}
}
Table orders {
id serial [pk increment not null]
user_id integer [not null]
total numeric(10,2) [default: `0`] [not null]
status varchar(32) [default: `pending`]
indexes {
(user_id) [name: 'orders_user_idx']
}
}
Ref: orders.user_id > users.idPlantUML
@startuml
hide circle
skinparam linetype ortho
entity "users" as users {
id : serial <<PK>>
email : varchar(255) <<UQ>>
created_at : timestamptz
}
entity "orders" as orders {
id : serial <<PK>>
user_id : integer
total : numeric(10,2)
status : varchar(32)
}
orders }o--|| users : "user_id"
@endumlAbout this tool
Build an entity-relationship model in the browser: edit columns, indexes and foreign keys, then drag tables around the diagram and export DDL, DBML or PlantUML. The DDL generator adapts types, quoting and auto-increment syntax per dialect, and the design can be saved to localStorage so it survives a reload. Nothing is uploaded and no database connection is ever made.
- 100% free β no account needed
- Runs in your browser
- Nothing is uploaded
Frequently asked questions
Is Database Schema Designer really free?
Yes. Database Schema Designer is completely free on PureBrowser β every feature, with no account, no trial, and no credit card.
Does Database Schema Designer upload my data?
No. Database Schema Designer runs entirely inside your browser, so anything you type, paste, or open stays on your own device.
Do I need to sign up or install anything?
Neither. There is no account and nothing to download β open the page and Database Schema Designer is ready to use on desktop or mobile.
Does Database Schema Designer work offline?
Once the page has loaded, yes. All of the processing happens locally in your browser, so it keeps working without a connection.
More developer tools
Folder Structure Generator
Build folder structure diagrams, ASCII directory trees, and file tree visualizations for READMEs and docs.
.gitignore Generator
Generate merged .gitignore rules for your stack with one click.
JSON to TypeScript Interface
Convert JSON into TypeScript interfaces with inferred nested types.
Text to Slug Converter
Convert titles and phrases into clean SEO-friendly URL slugs.
UTM Builder
Build campaign URLs with UTM parameters for analytics tracking.
JSON Formatter & Validator
Validate, format, and minify JSON directly in your browser.