Free — no signup required

Compare database schemas
side-by-side.

Paste two SQL schemas and see exactly what changed. Tables added, columns dropped, types narrowed, indexes missing — every difference highlighted with a semantic diff that understands SQL structure, not just text.

Supports PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. No data leaves your browser.

Why semantic schema comparison?

Text diffs break when SQL is reformatted. SchemaLens understands structure.

🔍

Side-by-Side Visual Diff

See every table, column, and constraint compared in a clean visual layout. Green for additions, red for removals, yellow for modifications. No more scrolling through thousand-line text diffs.

🛡️

Breaking Change Detection

Automatically flags dropped tables, removed columns, NOT NULL without defaults, type narrowing, and missing indexes. Know what's dangerous before you deploy.

🗄️

5 SQL Dialects

PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, and Oracle. Our custom parser understands each dialect's unique syntax and compares them accurately.

📊

Schema Change Risk Score

Every comparison gets a 0–100 risk score based on the severity of changes. Low-risk diffs get a green light. High-risk diffs demand a second review.

⚙️

Auto-Generate Migration SQL

Get ready-to-run ALTER TABLE scripts generated from the comparison. Copy, paste into your migration tool, and deploy with confidence.

🔗

Shareable Comparison Links

Share any schema comparison with your team via a URL. Perfect for code reviews, architecture decisions, and compliance audits.

What gets compared?

Element Detected In Migration
Tables (added/removed) ✅ Yes ✅ Yes
Columns (added/removed/modified) ✅ Yes ✅ Yes
Data types & defaults ✅ Yes ✅ Yes
Primary & Foreign Keys ✅ Yes ✅ Yes
Indexes ✅ Yes ✅ Yes
CHECK & UNIQUE Constraints ✅ Yes ✅ Yes
Triggers ✅ Yes ✅ Yes
Views ✅ Yes ✅ Yes
Functions & Procedures ✅ Yes ✅ Yes

4-step comparison workflow

1

Export Both Schemas

Run pg_dump --schema-only or export from your ORM for both the old and new schema versions.

2

Paste & Select Dialect

Paste schema A and schema B into SchemaLens. Choose your SQL dialect. Click Compare.

3

Review the Diff

Scan the visual diff for breaking changes. Check the risk score. Review each table's changes in detail.

4

Copy Migration SQL

Copy the generated ALTER TABLE scripts. Share the diff URL with your team. Deploy with confidence.

Related guides

Comparison

SQL Diff Online

A simpler, faster way to diff two SQL files without the full schema comparison features.

Migration

Schema Migration Tool

Generate ALTER TABLE scripts from any schema comparison. Ready to run in your migration framework.

Compare your schemas in seconds.

Stop guessing what changed between schema versions. Paste both schemas into SchemaLens and get a semantic diff with breaking change detection and ready-to-run migration SQL.

Compare Schemas Now

No signup required. No data leaves your browser.