DBML Renderer

Parse DBML and render a quick ASCII summary of tables and columns.

Open tool

Overview

The DBML renderer parses Database Markup Language and prints an ASCII summary of every table, its columns, and the references between them. Paste a schema.dbml file and immediately see the shape of the database without firing up dbdiagram.io's full visual renderer.

It's a fast sanity check during code review, useful when looking at a DBML pull request from a phone, or when you want to grep the schema as text. Database designers and backend developers use a dbml viewer to confirm structural changes before running migrations.

How it works

DBML, introduced by the Holistics team, is a small DSL for describing relational schemas in plain text. The parser walks Table blocks, extracting column names, types, default values, primary keys, and inline [ref:] annotations. Top-level Ref: declarations describe foreign keys between tables and are matched up with the column they cite.

Output is a fixed-width ASCII layout: each table gets a box with its column rows, and references are listed below as tableA.col > tableB.col lines. Notes and enums are preserved as separate sections so the summary covers everything the source declares.

Examples

Table users {
  id int [pk]
  email varchar
}

Table orders {
  id int [pk]
  user_id int [ref: > users.id]
  total decimal
}
users
  id     int        PK
  email  varchar

orders
  id        int       PK
  user_id   int       FK -> users.id
  total     decimal

Refs:
  orders.user_id > users.id

FAQ

Does it support indexes and enums?

Yes. Indexes { ... } blocks are listed under each table, and top-level Enum declarations are printed in their own section with all enum values.

Can I render the schema as an SVG diagram?

This tool emits ASCII only. For a graphical render, paste the same DBML into dbdiagram.io or convert it with @dbml/cli to an image. The ASCII view is for quick scanning, not presentation.

What if my DBML file has syntax errors?

The parser reports the line and column of the first error rather than silently skipping it, so you can fix the source before continuing.

Try DBML Renderer

An unhandled error has occurred. Reload ×