40,292
stars
+5+69+435
3,362
forks
146
watchers
780
prs
381
issues
1
releases
22
discussions
README
drawDB
Free, simple, and intuitive database schema editor and SQL generator.
DrawDB is a robust and user-friendly database entity relationship diagram (ERD) editor right in your browser. Build diagrams with a few clicks, export and import SQL scripts, generate migrations, customize your editor, and more without creating an account. See the full set of features on here.
Getting Started
Local Development
bash
git clone https://github.com/drawdb-io/drawdb
cd drawdb
npm install
npm run dev
Build
bash
git clone https://github.com/drawdb-io/drawdb
cd drawdb
npm install
npm run build
Docker Build
bash
docker build -t drawdb .
docker run -p 3000:80 drawdb
If you want to enable sharing, set up the server and environment variables according to .env.sample. This is optional unless you need to share files.
With the Docker image, pass the server URL when starting the container. No rebuild is needed:
bash
docker run -p 3000:80 -e VITE_BACKEND_URL=https://your-drawdb-server.example.com ghcr.io/drawdb-io/drawdb:latest
Contributing
Please see CONTRIBUTING.md for guidelines on how to contribute to this project.
Support
- Join discussions: DiscordTop issues
#561Failed to construct 'URL': Invalid URL15 comments · 2025-08-25#58[Feature] Have a way to collaborate9 comments · 2024-04-18#87[Suggestion] ORM export support8 comments · 2024-05-01#574[FEATURE]7 comments · 2025-09-06#25Auto generating Table7 comments · 2024-04-10#17Can ER diagram of already created database be created automagically?7 comments · 2024-04-07#655[BUG] Impossible to share (self hosted DrawDB)6 comments · 2025-10-18#298[BUG]表连接发生错乱6 comments · 2024-11-13
Discussions
#1088Is there a way to export the schema diagram as an image file directly, or is SQL the only export option currently?2 comments · 2026-08-03#1087Is there a name for the JSON export format?1 comments · 2026-08-03#1083Two different JSON shapes for the same diagram. Why?2 comments · 2026-07-27#1064Automatically generate references to foreign keys1 comments · 2026-07-02#834Movement?1 comments · 2026-01-07#664MCP ?1 comments · 2025-10-28#614HOW DO I TURN OFF NOTIFICATIONS1 comments · 2025-10-04#507Typescript1 comments · 2025-06-23
Latest release
v1.9.0 - Import from your database v1.9.0 2026-11-01Import from your database File → Import from database. Pick your dialect, copy the read-only query drawDB gives you, run it in the SQL client you already use (psql, Workbench, DBeaver, SSMS…), and paste the result back. drawDB draws the diagram and auto-arranges it. - Works with PostgreSQL, MySQL, MariaDB, SQL Server, SQLite and Oracle - No connection string: your credentials never leave your machine, and drawDB never sees row data (1182) Subject areas that hold tables Areas now own the tables inside them: move an area and its tables move with it, hide or show a whole group at