# SwitchCase Schemas. Write DBML. See the diagram.

> A free, local-first database diagram editor: write DBML or import SQL, get a live ER diagram, edit it visually, and export DBML, SQL, images, or JSON Schema—without an account.

- Page type: Product / work story
- Canonical page: https://switchcasestudios.com/work/switchschema
- Summary: Free, local-first database diagrams with no account: write DBML or import SQL, edit visually, and export SQL, PNG, SVG, PDF, or JSON Schema. Diagrams stay in your browser.
- Product or related link: [Open SwitchCase Schemas](https://schemas.switchcasestudios.com/)
- Product entity: SwitchCase Schemas
- Live product: [Try SwitchCase Schemas](https://schemas.switchcasestudios.com/)
- Product summary: A free, local-first database diagram editor—write DBML or import SQL, get a live ER diagram, edit it visually, and export SQL, images, or JSON Schema, with no account.
- Product features: DBML editor, Visual editing, SQL import & export, No account

## At a glance
- **No account:** Free, saved in your browser
- **DBML:** Same open-source parser as dbdiagram.io
- **SQL in + out:** PostgreSQL, MySQL, SQL Server, Oracle

## A schema diagram that stays in step with its code.
SwitchCase Schemas is a free database diagram editor that runs in the browser. Write DBML on the left and a live entity-relationship diagram appears on the right, with primary keys, not-null and unique badges, enums, notes, table groups, and crow’s-foot relationships. It uses the same open-source DBML parser as dbdiagram.io, by Holistics, so DBML files move between the two unchanged.

It is local-first: there is no account, and diagrams are saved in your browser’s local storage rather than uploaded to a server. Visual edits are written back into the DBML as targeted changes that keep your comments and formatting, so the text stays the source of truth. SwitchCase Schemas is not affiliated with dbdiagram.io or Holistics.

## The decision behind SwitchCase Schemas
### Constraint
A schema diagram is most useful when it stays in step with the code that defines it, and sketching one should not require an account.

### Design choice
DBML stays the source of truth: canvas edits are written back into it as targeted changes that keep comments, and diagrams are saved in the browser’s local storage instead of on a server.

### Trade-off
Without an account there is no sync or shared workspace. Diagrams stay in one browser until you export them, and a share link opens a copy rather than a live, shared document.

### In practice
Plain-text DBML keeps the diagram portable: files move between SwitchCase Schemas and dbdiagram.io unchanged, and an exported file can sit in version control beside the code.

## A conceptual product flow
1. **01 — Write or import a schema.** Type DBML with highlighting and inline errors, or import PostgreSQL, MySQL, SQL Server, Oracle, Snowflake, Rails schema.rb, or DBML JSON. The diagram updates as you go.
2. **02 — Edit on the canvas.** Select a table to edit it in the Inspector, or drag between columns to relate them. Each change lands in the DBML as a targeted edit that keeps your comments.
3. **03 — Export or share.** Export DBML, SQL, JSON, PNG, SVG, or PDF, or a JSON Schema for each table. A share link carries the whole diagram, compressed, in the URL.

## Product preview
![SwitchCase Schemas editor with the sample e-commerce DBML on the left, a live ER diagram with the orders table selected and glowing beside its highlighted relationships, and the Inspector open on the right](https://switchcasestudios.com/assets/images/previews/switchcase-schemas-product.webp)

Live editor · Sample diagram, orders table selected

Image dimensions: 1440 × 800.

## Explore this work
- [Explore software modernization consulting](https://switchcasestudios.com/services/software-modernization)

## Editor features and formats
- Free in the browser, with no account; diagrams are saved locally
- DBML editor with syntax highlighting and inline errors
- Import: DBML, PostgreSQL, MySQL, SQL Server, Oracle, Snowflake, Rails schema.rb, DBML JSON
- Export: DBML, PostgreSQL, MySQL, SQL Server, Oracle, JSON, PNG, SVG, PDF
- JSON Schema (draft 2020-12) per table, with sample create payloads and full rows
- Inspector editing, drag-to-relate, and full undo and redo
- Table groups with a title and subtext; auto-arrange
- Phone layout with Diagram and Code tabs

## Frequently asked questions
### Is SwitchCase Schemas an owned SwitchCase Studios product?
Yes. SwitchCase Schemas is an owned product from SwitchCase Studios: a free, local-first database diagram editor. It is not affiliated with dbdiagram.io or Holistics.

### Do DBML files work with dbdiagram.io?
Yes. SwitchCase Schemas uses the same open-source DBML parser by Holistics and stores DBML exactly as you wrote it, so files move between SwitchCase Schemas and dbdiagram.io unchanged. Table positions are not part of DBML, so imported diagrams are auto-arranged.

### Where are my diagrams stored?
In your browser’s local storage. There is no account and diagrams are not uploaded to a server, so they do not sync between browsers or devices, and clearing site data removes them. Export DBML to keep a copy.

### How do share links work?
A share link carries the whole diagram, compressed, in the URL. Opening it creates a copy in the recipient’s browser; later changes on either side are not synced. Anyone with the link can read the diagram, so share it only with intended recipients.

### What is the JSON Schema export?
For each table, SwitchCase Schemas generates a JSON Schema (draft 2020-12) with sample create payloads and full rows, shown in the Inspector and available as an all-tables export.

## Contact
Make a complex system easier to see.

SwitchCase can help turn a tangled data model or legacy system into something a team can inspect, discuss, and change with confidence.

[Contact SwitchCase Studios](https://switchcasestudios.com/#contact)
