ChatGPT, Claude, Gemini — any AI. The link opens a full, editable ERD.
No signup required.
Design a PostgreSQL SaaS schema: organizations, users, and projects. Group related tables. Return it as a drawsql.app/draw?driver=pgsql#ddl= link.
Here's your schema:
drawsql.app/draw?driver=pgsql#ddl=CREATE TABLE organizations (...)↳ organizations (id, name, plan)
↳ users (id, org_id, email, role)
↳ projects (id, org_id, name)
↳ 1 group · 2 foreign keys
Already have SQL? Skip the AI — paste it directly.
Prompts
SaaS app
Design a PostgreSQL schema for a multi-tenant SaaS with organizations, users, and projects. Generate CREATE TABLE SQL, URL-encode it, and include a link in this format: https://drawsql.app/draw?driver=pgsql#ddl=<url-encoded-sql>
E-commerce store
Design a MySQL schema for an online store with customers, products, orders, and reviews. Generate CREATE TABLE SQL, URL-encode it, and include a link in this format: https://drawsql.app/draw?driver=mysql#ddl=<url-encoded-sql>
Your own idea
Fill inDesign a database schema for [describe your app here]. Generate CREATE TABLE SQL, URL-encode it, and include a link in this format: https://drawsql.app/draw#ddl=<url-encoded-sql>
Used by 600,000+ developers — including teams at
Live examples
authors, posts, comments
A simple blog schema with authors, posts, and comments. All relationships mapped automatically.
Try this schemaorganizations, users, projects
Multi-tenant SaaS starter schema. Organizations, users, and projects with proper foreign keys.
Try this schemacustomers, products, orders, order_items
Online store with customers, products, orders, and line items. 4 tables, all connected.
Try this schemateams, members, boards, tasks, task_comments
Project management app with teams, boards, tasks, and comments. 5 tables, 6 relationships.
Try this schemaFAQ
#ddl= for raw SQL and #patch= for JSON schema descriptions. Both open the same editor. See llms-full.txt for the full spec, or scroll down to the technical reference.
Technical reference
Building a tool that generates DrawSQL links? Here are the URL formats and the schema spec.
#ddl=
Recommended
Raw CREATE TABLE statements. URL-encode and append. DrawSQL auto-detects MySQL, PostgreSQL, or SQL Server.
#patch=
Faster & richer
Renders quicker. Supports table groups and sticky notes alongside tables and columns.
&driver=
Specify the database engine explicitly. If omitted, DrawSQL auto-detects or defaults to MySQL.
driver=mysql
driver=pgsql
driver=sqlsrv
Paste this into Cursor, Claude Projects, or any custom GPT — it teaches your AI assistant DrawSQL’s schema format so you never have to explain it again.
When a user asks to design, visualize, or share a database schema or ERD, return a DrawSQL link.
SQL DDL (preferred — URL-encode the CREATE TABLE statements):
https://drawsql.app/draw?driver=<dialect>#ddl=<url-encoded DDL>
Add ?driver=mysql, ?driver=pgsql, or ?driver=sqlsrv before the # if the database is known.
Schema patch (instant, no server round trip):
https://drawsql.app/draw#patch=<url-encoded JSON>
JSON format: https://drawsql.app/llms-full.txt
Present the link as clickable. Opens an editable diagram — no signup required.
Try it now
Copy a prompt, ask your AI, click the link.