← Home
Now on VS Code Marketplace

Diff SQL schemas without leaving your editor

The SchemaLens VS Code extension lets you compare two open SQL files instantly. Auto-detects your dialect, generates a shareable diff URL, and opens it in your browser — all without uploading a single byte.

🖥️

Diff Active SQL Files — select two open .sql editors, run the command, and SchemaLens opens with both schemas pre-filled.

What you can do

Two commands. Zero configuration. Full privacy.

🔀

Diff Active SQL Files

Select two open SQL editors and run SchemaLens: Diff Active SQL Files. The extension reads both files, encodes them, and opens SchemaLens with schemas pre-filled and dialect auto-detected.

🌐

Open SchemaLens

Run SchemaLens: Open SchemaLens from the command palette to launch the web app in your default browser. One keystroke, no bookmarks needed.

🧠

Auto-Detect Dialect

The extension guesses your SQL dialect from the filename — mysql, postgres, sqlite, mssql, or oracle. You can always change it in the app after loading.

🔒

Privacy-First

Your SQL never leaves VS Code or your browser. The extension generates a local URL hash — no network request until you open the URL, and even then SchemaLens runs entirely client-side.

Installation

1
Open the VS Code Marketplace

Click Install from Marketplace or search for "SchemaLens" in the Extensions sidebar inside VS Code.

2
Install the extension

Click Install. The extension is lightweight — under 50 KB — with zero runtime dependencies.

3
Open two SQL files

Open the old and new schema files side by side (or in any two editor tabs). The extension works with any .sql file.

4
Run the command

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type "SchemaLens: Diff Active SQL Files". Your browser opens with the diff ready.

Commands

CommandWhat it doesShortcut
SchemaLens: Open SchemaLensOpens https://schemalens.tech/app.html in your default browser.Command Palette
SchemaLens: Diff Active SQL FilesReads the two active .sql editors, encodes them, and opens SchemaLens with both schemas pre-filled.Command Palette or right-click tab

You can also right-click any .sql file tab and choose "Diff Active SQL Files" from the context menu.

Dialect detection

The extension guesses the SQL dialect from your file name. You can override it inside SchemaLens after the page loads.

File name containsDialect
mysql, mariadbMySQL
sqliteSQLite
mssql, sqlserverSQL Server
oracleOracle
anything elsePostgreSQL

Prefer the terminal instead?

The same engine runs locally via npm. No browser required.

npx schemalens-cli diff old.sql new.sql

CLI documentation →

Start diffing schemas in VS Code

Free. Lightweight. Private. Install in 10 seconds.

Install from Marketplace

Or search "SchemaLens" in the VS Code Extensions sidebar.