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
Click Install from Marketplace or search for "SchemaLens" in the Extensions sidebar inside VS Code.
Click Install. The extension is lightweight — under 50 KB — with zero runtime dependencies.
Open the old and new schema files side by side (or in any two editor tabs). The extension works with any .sql file.
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
| Command | What it does | Shortcut |
|---|---|---|
| SchemaLens: Open SchemaLens | Opens https://schemalens.tech/app.html in your default browser. | Command Palette |
| SchemaLens: Diff Active SQL Files | Reads 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 contains | Dialect |
|---|---|
mysql, mariadb | MySQL |
sqlite | SQLite |
mssql, sqlserver | SQL Server |
oracle | Oracle |
| anything else | PostgreSQL |
Prefer the terminal instead?
The same engine runs locally via npm. No browser required.
npx schemalens-cli diff old.sql new.sql
Start diffing schemas in VS Code
Free. Lightweight. Private. Install in 10 seconds.
Install from MarketplaceOr search "SchemaLens" in the VS Code Extensions sidebar.