Open-source project
drawdb-io/drawdb avatar
drawdb-io/drawdb

drawDB: A Browser-Based ERD Editor and SQL Generator Under AGPL-3.0

drawDB is a free browser-based database diagram editor and SQL generator for building ERDs, exchanging SQL scripts and creating migrations without an account.

40,323 stars3,365 forksJavaScriptAGPL-3.0

At a glance

What is it?
drawDB is a free, browser-based database schema editor that generates SQL and supports migrations. This review covers its workflow, setup, limitations, and licensing for engineers evaluating it.
Who is it for?
Adopt drawDB if you need a quick, no-account browser tool for designing ERDs and generating SQL especially if you prefer visual editing over writing DDL by hand. Avoid it if you require advanced collaboration, version control integration, or if AGPL-3.0 licensing conflicts with your distribution model.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 13, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • drawdb-io/drawdb40,323 ★ · +2,117
Star history
Repository2026-07-282026-11-13
drawdb-io/drawdb38.2k40.3k

2,117 Stars in the last 108 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What drawDB Solves and Who It Is For

drawDB addresses a common pain point: turning a database schema into a visual diagram and back into SQL without leaving the browser. It is an entity relationship diagram (ERD) editor that also generates SQL scripts and migrations. The intended user is a developer or data modeler who wants to sketch tables, relationships, and columns quickly, then export a ready-to-run schema. The README emphasizes that no account is required, which lowers the barrier for ad-hoc design tasks. This is not a full database management tool; it focuses on the design and generation phase, not on executing queries or managing live data.

How drawDB Works: From Diagram to SQL

The core mechanism is a visual editor where you build entities and relationships with a few clicks. The application is a JavaScript frontend that runs entirely in the browser. When you create tables and define columns, the tool translates that model into SQL statements. It also supports importing SQL scripts, which suggests a reverse-engineering flow: you can load an existing schema, visualize it, and then modify or export it. The README mentions 'generate migrations'.. The data flow is straightforward: your diagram is the source of truth, and SQL is the output format. Sharing requires the optional server.

Getting drawDB Running: Local, Build, and Docker

The README provides three setup paths. For local development, clone the repository, run `npm install`, then `npm run dev`. This starts a development server (the dev script runs vite). For a production build, the same clone and install steps apply, followed by `npm run build`. The Docker route is the simplest for a quick test: `docker build -t drawdb .` then `docker run -p 3000:80 drawdb`. This maps port 3000 on your host to port 80 in the container, so you access drawDB at `http://localhost:3000`. The Docker image serves the built static files via nginx. There is no database setup or configuration file to edit for basic use. The only optional configuration involves environment variables for the sharing server, which is a separate backend component.

The Optional Sharing Server and Its Constraints

Sharing diagrams is not built into the main repository. The README points to a separate server project, `drawdb-server`, and instructs you to set environment variables according to `.env.sample` to enable sharing. This means out of the box, drawDB is a local-only tool. If you want to send a diagram link to a colleague, you must deploy and configure an additional component. That is a real limitation for team collaboration. The sharing feature is optional, and the README says it is only needed 'if you need to share files'. For a solo developer, this is fine, but for a team evaluating drawDB, the extra infrastructure is a consideration.

Licensing: AGPL-3.0 and What It Means for You

drawDB is licensed under AGPL-3.0. This is a strong copyleft license. If you modify the code and run it as a network service, you must make your modified source available to users of that service. For internal use, this is often acceptable, but if you plan to embed drawDB in a commercial product or offer it as a hosted service, the AGPL obligations can be onerous. The README does not mention any dual licensing or commercial exceptions. This is a critical factor for engineering teams that want to integrate drawDB into a proprietary stack. You should consult a lawyer, but the general implication is that any derivative work distributed or provided over a network must be open-sourced under AGPL. This is a genuine barrier for some adoption scenarios.

Limitations and Cases Where drawDB Is the Wrong Tool

drawDB is not a database client. It does not execute queries, manage users, or handle performance tuning. It is a design-time tool. The README does not mention support for specific database vendors, so you must assume the SQL generation may not cover every dialect's quirks. For complex schemas with advanced constraints, triggers, or stored procedures, the visual editor may not offer the granularity you need. Also, the sharing feature is bolted on via a separate server, which adds operational overhead. If your workflow requires tight integration with version control, such as storing schema definitions as code and diffing them in pull requests, drawDB is not the right fit because it is primarily a GUI tool. The lack of a CLI or a file format that is easy to review in text is a limitation for teams that prefer schema-as-code practices.

Alternatives and How They Differ

A common alternative is a schema-as-code tool like Prisma or Sequelize, where you define models in code and generate migrations. These tools treat the schema as a programmatic artifact, enabling version control, automated testing, and CI/CD integration. drawDB, in contrast, treats the schema as a visual diagram. The difference is in the workflow: with drawDB you click and drag, with Prisma you write a schema file. For developers who are comfortable writing code, a code-first approach offers more control and reproducibility. Another alternative is a desktop ERD tool like DBeaver, which connects to live databases and can reverse-engineer schemas. DBeaver is not browser-based and requires installation, but it provides a direct connection to your database. These alternatives are not drop-in replacements; they represent a different philosophy about where the schema definition lives.

Editorial conclusion

Adopt drawDB if you need a quick, no-account browser tool for designing ERDs and generating SQL especially if you prefer visual editing over writing DDL by hand. Avoid it if you require advanced collaboration, version control integration, or if AGPL-3.0 licensing conflicts with your distribution model. Before adopting, verify the current feature set on the homepage, test the SQL generation against your target database, and review the sharing server requirements if you need multi-user workflows.

Frequently asked questions

Is drawdb free to use?

The project describes itself as a free, simple, and intuitive online database diagram editor and SQL generator, ships under AGPL-3.0, and points to drawdb.app as the hosted entry point. Nothing in the repository describes a paid tier, a seat limit, or a feature that is held back.

how to use drawdb

For local work, clone the repository, run npm install, then npm run dev, and Vite serves the editor from your checkout. The hosted copy sits at drawdb.app, and the project states you can build diagrams without creating an account.

What is the best tool for creating ERD diagrams?

The repository does not rank tools, and it never names a competitor. What it does show is the shape of this one: a browser ERD editor under AGPL-3.0 that works without an account, keeps state through dexie in package.json, and ships jspdf, jszip, html-to-image and @dbml/core for output.

drawdb vscode

There is no VS Code extension, command line tool, or editor integration anywhere in this repository. The delivered forms are a browser app at drawdb.app, a local Vite dev server, and a Docker image that serves static files through nginx.

Can I generate an ER diagram from SQL online for free?

The project presents itself as a database entity relationship diagram editor in the browser that can export and import SQL scripts, so SQL to diagram is the advertised path. SQL parsing runs through node-sql-parser and oracle-sql-parser, and the README gives no dialect list, so test a round trip with your own dump before relying on it.

drawdb vs dbdiagram

The repository contains no comparison of the two. drawDB sends readers to drawdb.app for its own feature list and never names dbdiagram, so any side by side you find has to come from somewhere outside this project.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
Community

Where developers are discussing it

Posts on Hacker News, dev.to and Lobsters that link to this repository, found by our scan of those communities. 1 in the last 30 days; newest first.

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/drawdb-io-drawdb.svg)](https://hysenlabs.com/projects/drawdb-io-drawdb)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/drawdb-io-drawdb.svg)](https://hysenlabs.com/projects/drawdb-io-drawdb)

Was this useful?