← All tools
Free tool
DBML to SQL converter
Convert DBML Table blocks and Refs to PostgreSQL DDL, or SQL back to DBML, in one click. Free, instant, runs entirely in your browser.
Direction:
schema.sql · 13 lines
schema.dbml · 2 tables
Table users {
id uuid [pk, default: `gen_random_uuid()`]
email text [not null]
name text
created_at timestamptz [not null, default: `now()`]
}
Table posts {
id uuid [pk, default: `gen_random_uuid()`]
author_id uuid [not null]
title text [not null]
published boolean [not null, default: `false`]
}
Ref: posts.author_id > users.id
Frequently asked questions
Related tools
Keep exploring
Turn it into an ER diagram
Paste your PostgreSQL connection string and get an interactive ER diagram of your own schema in under 10 seconds. No signup required.