DB StencilDBStencil
Get Started Free
FeaturesShowcasePricingFAQSign inGet Started Free
NOW IN PUBLIC BETA

Stop guessing. Start mapping.

Visual canvas, DBML editor, clean PostgreSQL DDL — all from one source of truth.

Free during betaCanvas + DBML in syncClean PostgreSQL export
DB Stencil - Database Schema Designer - Design your database visually  | Product Hunt
LIVE

• CAPABILITIES

Everything you need to design schemas.

Five primitives, designed to stay in sync. From your first sketch to a production-ready PostgreSQL migration.

FLAGSHIP

Canvas and code, locked in sync

Drag a table on the canvas — the DBML updates. Edit DBML — the diagram redraws. They are the same source of truth, always.

Canvas
DBML
Table users {
id int [pk]
email varchar
}

CANVAS

Drag, draw, group

Infinite canvas with drag-and-drop tables, draw relations, group related tables.

EDITOR

Write code, see diagrams

A real DBML editor with autocomplete and live preview. Code feels first-class.

EXPORT

Clean PostgreSQL DDL

Constraints, indexes, foreign keys — generated cleanly and ready to run.

ORGANIZE

Multiple schemas, one home

Sign in once, switch between projects in a click. Your work stays organized.

• PRODUCT

See your schema come alive.

Two views of the same data model. Edit one — the other updates instantly.

users.dbml — canvas
usersid (PK)integeremailvarcharnamevarcharcreated_attimestamppostsid (PK)integeruser_id (FK)integertitlevarcharbodytextcommentsid (PK)integerpost_id (FK)integerbodytext
users.dbml — code
1Table users {2  id         integer   [pk]3  email      varchar   4  name       varchar   5  created_at timestamp 6}7 8Table posts {9  id         integer   [pk]10  user_id    integer   [ref: > users.id]11  title      varchar   12  body       text      13}14 15Table comments {16  id         integer   [pk]17  post_id    integer   [ref: > posts.id]18  body       text      19}
Drag to rearrange DBML stays in sync Type-safe DDL

• HOW IT WORKS

Three steps from sketch to production.

From a blank canvas to a PostgreSQL migration in minutes.

01

Sketch

Drop tables onto the canvas, name columns, and draw relations. The diagram becomes your spec.

02

Sync

DBML mirrors every change automatically. Edit either side — both stay aligned.

03

Export

Generate clean PostgreSQL DDL with constraints, indexes, and foreign keys ready for your migration.

• BUILT FOR

Built for every role on your team.

From the new hire exploring a legacy schema to the architect designing the next system.

01 / 04
01 / 04
Onboarding

The New Joiner

Joining a team with a 50-table legacy database? Paste the DBML and see the schema as a visual diagram in seconds — no more squinting at SQL files before your first standup.

02 / 04
Design

The Architect

Design new schemas from scratch and keep the diagram and DBML perfectly in sync. Draw on the canvas or write code — switch sides whenever it suits you.

03 / 04
Analysis

The Data Analyst

Understand foreign key chains and table relationships without asking a developer every time. The data model becomes self-explanatory.

04 / 04
Administration

The DBA

Lay out indexes, foreign keys, and constraints visually, then export clean PostgreSQL DDL ready for migration.

• HONEST TAKE

Built for some things. Not everything.

WORKS GREAT FOR

Teams managing schemas with 10+ tables
Projects that need PostgreSQL DDL or DBML handoff
Engineers who want canvas and code to stay in sync

NOT THE RIGHT TOOL IF

You need a 3-table side project diagram (a whiteboard is enough)
You want to query a live database (use a SQL client)
You expect MySQL or Oracle export today (it's on the roadmap)

I kept jumping between dbdiagram.io for the canvas and a text editor for DBML. Neither stayed in sync. I wanted one tool where the diagram and the code were the same thing — not two separate representations.

It's designed for the moment you join a codebase and open the schema file in confusion, or when you're pitching a data model and need something that looks professional fast.

FROM THE BUILDERS

A
Aditya PrasadBuilder of DBStencil
S
Shreshth VermaBuilder of DBStencil

• FAQ

FAQ

No. DBStencil works on schemas only. You write DBML or build on the canvas — your database credentials never leave your hands.

PostgreSQL is the only export target today. MySQL, SQLite, and other dialects are on the roadmap — we'll announce each one as it ships.

Yes — clean PostgreSQL DDL with constraints, indexes, and foreign keys, ready to run against your database.

The canvas and DBML editor stay in sync in real time. Edit either one and the other updates instantly.

Not yet. For now you can paste DBML or build a schema from scratch on the canvas. SQL import is on the roadmap.

DBStencil is free during the public beta. Sign up, create a workspace, and start designing — no card required.

• START NOW

Stop guessing. Start mapping.

Sign up free during the beta. No credit card. PostgreSQL export ready today.

Get Started Free

Free during public beta · Email or Google · 30 second sign-up