OPEN SOURCE VS CODE EXTENSION

See your schema.
Instantly.

Schema Lens turns your SQL and ORM files into a live ERD in VS Code — no database required.

SQLPrismaDrizzleKnex
Install from MarketplaceView on GitHub

Free forever · Open source · No sign-up

schema.sql — Schema Lens
HOW IT WORKS

ERD in three keystrokes.

01

Open

SQL migrations, Prisma, Drizzle, or Knex — Schema Lens detects the format automatically.

schema.prisma
02

Click ≋ ERD

Hit the ERD button in the editor title bar. No setup. No config file.

03

Explore

Zoom, pan, hover columns for details. Compare two schema versions side by side.

FEATURES

Everything you need. Nothing you don't.

File-first, offline

Reads the migration files already in your repo. No uploads, no exports, no external service.

Four formats

SQL, Prisma, Drizzle ORM, and Knex. Open parser API for adding new formats.

Schema diff view

Compare two schema versions visually. Added tables teal, removed red, modified amber.

Zoom, pan, drag

Rearrange the ERD canvas freely. Zoom with scroll, drag nodes to your preferred layout.

VS Code native

Docked side panel, respects light/dark theme, integrates with the status bar.

Zero config

Install and open a schema file. The extension activates automatically.

Lives right inside VS Code.

Install once. Open a schema file. Hit ≋ ERD.

Schema Lens running inside VS Code — ERD panel open alongside SQL schema
≋ 4 formats⊙ Zero config◎ Fully offline
WHY SCHEMA LENS

Built for developers who live in Git.

Most ERD tools sit behind SaaS paywalls, live in a browser, and expect you to upload a schema or connect a live database.

Schema Lens takes a different path. It lives inside VS Code and reads the files already in your repo — no export, no uploads, no separate dashboard.

“No sign-up. No project setup. Just open a file and click ≋ ERD.”

No sign-up, no project setup

Open a file, click a button. That's it.

No live database required

Works in local dev, CI, or early design when no DB instance exists.

No proprietary formats

Delete Schema Lens and your schemas are unchanged. SQL/Prisma/Drizzle/Knex stay as-is.

Designed for Git workflows

ERD comes from your migration history. Diffs, code review, PRs — all native.

OPEN SOURCE

Why is Schema Lens free?

Schema Lens is an open source project built by developers who spend a lot of time reading other people's migrations. The extension has no server-side component and no per-user costs, so there's no reason to gate it behind a subscription.

Long term, we may explore optional paid add-ons — for example, a hosted diff viewer or team features — but the core extension will remain free and open source.

Public code

MIT licensed, auditable, forkable.

No backend

Runs entirely on your machine inside VS Code.

No tracking

No telemetry beyond VS Code's own.

FORMATS

Works with how you already write schemas.

SQL

SQL Migrations

Raw .sql files. Supports PostgreSQL and MySQL dialects via node-sql-parser.

CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL
);
Prisma

Prisma

Reads schema.prisma models, @relation, @id, @unique attributes.

model User {
id Int @id @default(autoincrement())
email String @unique
posts Post[]
}
Drizzle

Drizzle ORM

Walks the TypeScript AST for pgTable, mysqlTable, sqliteTable calls.

const users = pgTable('users', {
id: serial('id').primaryKey(),
email: varchar('email', { length: 255 }),
});
Knex

Knex

Detects createTable migrations and .foreign().references().inTable() chains.

table.string('email', 255).notNullable();
table.foreign('owner_id')
.references('id').inTable('users');
ABOUT

Built by one developer, for developers.

SangeethFull-stack developer

Hi, I'm Sangeeth. I built Schema Lens because I kept switching between my editor and browser tabs just to remember what columns a table had.

Schema Lens is a side project I maintain in my spare time. If it's useful to you, a GitHub star or a coffee goes a long way.

☕ Buy me a coffee
CONTACT

Get in touch.

Questions, bugs, feature requests — or just want to say hi.

Alternatively, open an issue on GitHub or start a discussion in the repo.