⚡ Lifetime Pro: $39 once — pay once, keep forever. Claim yours → · 🏆 Founding Customer bonuses → · Or get Pro free by sharing →
🏷️ 70+ free developer tools — open source core
Core engine is open source (MIT)

Compare SQL schemas.
Generate migrations.
Zero setup.

Paste two CREATE TABLE dumps. Spot every difference instantly. Get ready-to-run ALTER TABLE scripts in PostgreSQL, MySQL, SQLite, SQL Server, and Oracle — in your browser, CLI, or VS Code.

PostgreSQL MySQL / MariaDB SQLite SQL Server Oracle
🚀 Get free lifetime Pro when you share SchemaLens with your network →
🐦 Or share on X/Twitter or LinkedIn to unlock Pro for 7 days instantly →

No account required. No data leaves your device.

🛡️ Reviewing a migration? Use our Database Migration Safety Checklist

⚡ CLI: npx schemalens-cli diff old.sql new.sql Docs →
🖥️ VS Code: Diff SQL files directly from your editor Learn more →
🔄 GitHub Action: Diff schemas in every PR — free Learn more →
🧩 Chrome: Diff SQL files on GitHub instantly Install →
Initializing...
-- Schema A (Old)
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(100)
);
-- Schema B (New)
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(255)
created_at TIMESTAMP
);
-- Generated Migration
ALTER TABLE users
ALTER COLUMN email TYPE VARCHAR(255);
ALTER TABLE users
ADD COLUMN created_at TIMESTAMP;
70+
Free dev tools
45+
Migration guides
5
SQL dialects
0
Data sent to servers
🔒 100% client-side — zero data sent to servers
⚙️ Also on CLI: npx schemalens-cli
🏗️ Engineering transparency →
🖥️ VS Code Extension →
🧩 Chrome Extension →

Built for Engineers

MIT Licensed Zero Dependencies Custom SQL Parser 170+ Tests 5 Dialects

Why developers love SchemaLens

Stop squinting at text diffs. Get a semantic, visual comparison that understands your schema.

🔍

Semantic Diff

Not a line-by-line text comparison. We understand tables, columns, types, defaults, indexes, and constraints.

Instant Migrations

Generate ALTER TABLE scripts in PostgreSQL, MySQL, or SQLite dialects. Copy, paste, deploy.

🔒

100% Private

All processing happens in your browser. Your schemas never touch our servers. Perfect for sensitive data.

🌐

Multi-Dialect

PostgreSQL, MySQL, MariaDB, SQLite support out of the box. More dialects coming based on demand.

📤

Export & Share

Download diffs as Markdown, PDF, or raw SQL. Share a link with your team for async review.

🛠️

Zero Install

No CLI to learn. No dependencies to install. No Docker image to pull. Open your browser and go. Or use npx schemalens-cli if you prefer the terminal.

🖥️

VS Code Extension

Diff two open SQL files directly from VS Code. Auto-detects dialect, generates a shareable diff URL, and opens it in your browser. Learn more →

🧩

Chrome Extension

Adds an "Open in SchemaLens" button to every .sql file on GitHub and a "Diff in SchemaLens" button on PR "Files changed" pages. One click to diff schemas, detect breaking changes, and generate migrations. Install from Web Store → See PR Demo →

🔄

GitHub Action

Catch breaking schema changes in every pull request. Post diff comments on PRs, fail the build on dangerous migrations, and compare schemas between branches — all for free. Learn more → See demo →

How it works

From schema dumps to migration scripts in three simple steps.

Paste Schema A

Copy your old schema dump — from pg_dump, mysqldump, or your ORM — and paste it into the left pane.

Paste Schema B

Paste the new schema into the right pane. SchemaLens parses both instantly, understanding structure — not just text.

Review & Export

See every change highlighted. Generate migration SQL in your dialect. Export, share, or copy into your migration tool.

When SchemaLens shines

Not a replacement for your migration framework. A precision tool for the moments when you need answers now.

🔄

Staging vs Production Drift

Your staging environment has drifted from production and you do not know why. Paste both schema dumps and see exactly what changed in 10 seconds. No CLI setup, no config files.

👀

Reviewing Migration PRs

A teammate opened a PR with schema changes but only included the DDL dumps. Instantly generate a visual diff and migration script to verify nothing was missed before approving.

🏛️

Auditing Legacy Projects

Inherited a codebase with no migration history? Compare the current schema against a backup or another environment to document exactly what has drifted over time.

One-Off Checks Without the CLI

You are on a machine without your usual toolchain. Or you are working with a database you do not own. Open a browser, paste the schemas, and get answers instantly — zero install.

Already have Liquibase or Flyway? See how we complement your existing workflow →

See it in action

Watch SchemaLens diff a real schema and generate the migration script — no setup required.

🐘 PostgreSQL Demo

See a 3-table blog schema evolve with new columns, types, and tables.

Run PostgreSQL Demo

🐬 MySQL Demo

Watch auto-increment keys, foreign keys, and index changes get detected.

Run MySQL Demo

🪟 SQL Server Demo

Compare NVARCHAR schemas with IDENTITY columns and computed fields.

Run SQL Server Demo

🗄️ Oracle Demo

Detect VARCHAR2 changes, NUMBER precision shifts, and new constraints.

Run Oracle Demo

Free developer tools

Handy utilities that run in your browser. No signup required.

SQL Validator

Paste CREATE TABLE statements and get instant validation for PostgreSQL, MySQL, SQLite, and SQL Server.

Validate SQL

SQL Formatter

Beautify messy SQL queries with proper indentation, keyword casing, and syntax highlighting.

Format SQL
🔀

Schema Diff

Compare two database schemas and generate migration scripts in seconds. Our flagship tool.

Compare Schemas
🌿

Git Branch Diff

Compare schema files between Git branches, tags, or commits. Fetch from public GitHub repos instantly.

Diff Branches
📄

Schema Docs

Generate beautiful HTML documentation from your CREATE TABLE statements. Export to Markdown.

Generate Docs
📊

CSV to SQL

Convert CSV files to CREATE TABLE and INSERT statements. Auto-detects column types and delimiters.

Convert CSV
🗂️

JSON to SQL

Convert JSON objects to CREATE TABLE statements. Handles nested objects, arrays, and auto-detects types.

Convert JSON
🏗️

CREATE TABLE Generator

Build CREATE TABLE statements visually. Add columns, set types, and choose constraints for any dialect.

Generate Table Alter Table
📋

Schema Templates

Production-ready database schemas for blogs, e-commerce, SaaS, chat, and more. Copy-paste and customize.

Browse Templates
📝

SQL INSERT Generator

Generate INSERT statements with batch support and UPSERT syntax. Supports all major SQL dialects.

Generate INSERT
🔗

SQL JOIN Visualizer

Learn SQL JOINs interactively with live data, Venn diagrams, and instant SQL generation. Covers all 6 JOIN types.

Visualize JOINs
🏥

Schema Health Check

Lint your schema for missing primary keys, unindexed foreign keys, and other design issues.

Check Health
🔥

SQL Schema Roast

Get your database schema roasted with humorous but genuinely helpful feedback. Shareable roast cards included.

Get Roasted
🌐

SQL Dialect Translator

Convert CREATE TABLE statements between PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Handles type mapping and syntax differences.

Translate SQL
🎲

SQL Test Data Generator

Generate realistic INSERT statements from CREATE TABLE definitions. Smart column-name detection for emails, names, prices, and more.

Generate Data
🎭

SQL Data Masking Generator

Generate SQL UPDATE scripts to mask PII and anonymize sensitive columns. Auto-detects 30+ patterns for GDPR-compliant dev databases.

Mask Data
📐

Schema Normalization Checker

Check your CREATE TABLE statements for 1NF, 2NF, and 3NF violations. Learn normalization with real fix suggestions.

Check Normalization
🛡️

Safe Migration Checker

Audit migration scripts for dangerous operations before production. Detects unsafe ALTER TABLE, missing defaults, and lock risks.

Check Safety
⚠️

Reserved Words Checker

Check table and column names against SQL reserved words for all 5 dialects. Prevent quoting headaches and migration failures.

Check Names
🏷️

Naming Convention Checker

Audit your schema against engineering naming conventions. Detect inconsistent case styles, bad abbreviations, missing timestamps, and soft-delete antipatterns.

Check Naming
📋

SQL IN Clause Builder

Convert any list of values into a properly quoted SQL IN clause. Auto-detects strings, numbers, dates, and UUIDs. Handles escaping, NULLs, and duplicates.

Build IN Clause
🔄

SQL to ORM Converter

Convert CREATE TABLE statements to Prisma or Drizzle schemas instantly. Supports all 5 dialects with full type mapping.

Convert to ORM
📘

SQL to TypeScript

Generate TypeScript interfaces and Zod validation schemas from CREATE TABLE statements. Supports all 5 dialects.

Generate Types
🐍

SQL to Python

Generate SQLAlchemy ORM models and Pydantic schemas from CREATE TABLE statements. Supports all 5 dialects.

Generate Python
🐹

SQL to Go Generator

Convert CREATE TABLE statements to Go structs with json, db, and GORM tags. Supports all 5 dialects with sql.Null* nullable types.

Generate Go

SQL to Java Generator

Convert CREATE TABLE statements to Java JPA Entity classes with Hibernate annotations, Lombok, and Jackson support. All 5 dialects.

Generate Java
🦀

SQL to Rust Generator

Convert CREATE TABLE statements to Rust structs with Serde, sqlx, and Diesel annotations. Smart Option<T> for nullable, all 5 dialects.

Generate Rust
🔍

SQL SELECT Generator

Generate SELECT statements from CREATE TABLE schemas. Auto-detects JOINs from foreign keys across all 5 dialects.

Generate SELECT
✏️

SQL UPDATE Generator

Generate safe UPDATE statements from CREATE TABLE schemas. SET placeholders, PK WHERE clauses, JOIN updates, and bulk CASE patterns.

Generate UPDATE
🗑️

SQL DELETE Generator

Generate safe DELETE statements with primary-key WHERE clauses. Supports JOIN deletes, soft-delete patterns, bulk DELETE, and TRUNCATE.

Generate DELETE

SQL UPSERT Generator

Generate UPSERT and MERGE statements from CREATE TABLE schemas. ON CONFLICT, ON DUPLICATE KEY, MERGE INTO — all 5 dialects.

Generate UPSERT
🔀

SQL CASE WHEN Generator

Generate CASE WHEN statements from CREATE TABLE schemas. Equality maps, range buckets, conditional aggregates, and UPDATE patterns.

Generate CASE
💬

SQL Query Explainer

Paste any SQL query and get a plain-English breakdown of what it does. Explains JOINs, CTEs, window functions, and subqueries.

Explain Query
🔗

Connection String Parser

Parse and build database connection strings for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Debug connection issues instantly.

Parse String
📊

Data Types Reference

Compare SQL data types across 5 dialects. Find equivalents when migrating schemas.

Open Reference
📈

SQL Index Analyzer

Find missing indexes, unindexed foreign keys, and query-specific index gaps. Get instant recommendations.

Analyze Indexes
🕸️

ER Diagram Generator

Generate visual entity-relationship diagrams from your CREATE TABLE statements. Export as SVG.

Generate Diagram
🧜

Mermaid ERD Converter

Convert SQL CREATE TABLE to Mermaid ERD syntax with live preview. Perfect for GitHub READMEs and Notion.

Convert to Mermaid
🗂️

DBML Converter

Convert SQL CREATE TABLE to DBML (Database Markup Language). Import into dbdiagram.io instantly.

Convert to DBML
🌿

PlantUML ERD Converter

Convert SQL CREATE TABLE to PlantUML ERD syntax. Generate entity-relationship diagrams for documentation and wikis.

Convert to PlantUML
📡

OpenAPI / JSON Schema Converter

Convert SQL CREATE TABLE to OpenAPI 3.0 and JSON Schema. Smart type mapping, enum detection, and nullable handling.

Convert to OpenAPI
💰

Migration Cost Calculator

See what manual migrations actually cost your team. Most spend $10,000+ per year without realizing it.

Calculate Cost
🎬

Video Tips

Free 60-second video guides on schema diff, breaking changes, and safe migrations. Watch, learn, share.

Watch Tips
🧪

SQL Test Data Generator

Generate realistic fake SQL test data instantly. Paste a CREATE TABLE statement and get INSERT statements for any dialect.

Generate Data
🎯

Schema Mistake Quiz

Test your database design knowledge. Spot common schema mistakes before they hit production in 60 seconds.

Take Quiz
🚨

Breaking Change Quiz

Can you spot the migrations that break production? 10 real-world schema changes. Test your migration safety skills.

Take Quiz
🧩

Schema Guessr

Can you guess the famous app just by looking at its database schema? A fun, shareable game for developers.

Play Now

Schema Diff Speed Challenge

Race the clock to spot schema changes manually, then see how SchemaLens finds them instantly. How fast are your eyes?

Start Challenge
🎤

Schema Design Interviews

Practice real SQL schema design questions from Twitter, Uber, and URL shortener. Compare your solution with expert answers.

Practice
🌍

Famous Database Schemas

Explore real-world SQL designs from Twitter, Uber, E-commerce, Chat, and more. With ERD diagrams and copy-ready CREATE TABLE statements.

Explore
📐

Schema Design Patterns

10 production-ready SQL patterns: soft deletes, audit logs, multi-tenancy, tagging, tree structures, and more. Copy-ready CREATE TABLE statements.

Learn Patterns
🚨

Schema Anti-Patterns

10 common schema mistakes that cause outages and data loss. See the wrong way, the right way, and the diff between them.

See Mistakes
🏷️

Badge Generator

Generate custom SVG badges for your GitHub READMEs and shared schema diffs. Embed diff status anywhere.

Make Badge
🖥️

VS Code Extension

Diff two open SQL files directly from VS Code. Auto-detects dialect and opens SchemaLens with both schemas pre-filled.

Install Extension
🧩

Chrome Extension

Adds an "Open in SchemaLens" button to every .sql file on GitHub and a "Diff in SchemaLens" button on PR pages. One-click diff with auto-detected dialect.

Install from Web Store 👁️ See PR Diff Demo
🖼️

Embed Widget

Add a live schema diff iframe to your documentation, blog, or README. Auto-generated code with live preview.

Generate Embed
📦

schema-diff CLI

Zero-config npm package for schema diff in any CI system. GitHub Actions, GitLab CI, JUnit XML, JSON, Markdown, and SQL output. npx schema-diff old.sql new.sql

Learn More
🧙

GitHub Action Setup Wizard

Answer 4 questions, get a ready-to-use GitHub Actions workflow. No YAML guessing. Generates branch comparison, PR comments, and breaking-change gates.

Generate Workflow
🔖

SchemaLens Bookmarklet

Diff any SQL you see on the web — GitHub PRs, blog posts, docs, Stack Overflow. Drag to your bookmarks bar, click on any page with CREATE TABLE statements.

Get Bookmarklet
⌨️

Schema Diff in 1 Command

Diff two database schemas from your terminal with a single curl command. No signup, no API key. Markdown diff + breaking change report.

Copy Command
📄

Schema Diff Report Generator

Generate beautiful branded PDF reports from any schema diff. Attach to Jira tickets, Linear issues, or GitHub PRs. Markdown export included.

Generate Report
🐙

GitHub PR Schema Diff

Paste any public GitHub PR URL and instantly review the schema changes. Generate PR comments with breaking-change warnings.

Review PR
📚

Schema Diff Examples

Explore real-world database migrations with one click. See SchemaLens in action on soft deletes, multi-tenant migrations, and more.

Explore Examples
🔥

Schema Diff Weekly Challenge

Weekly schema diff challenges from real open-source projects. Spot breaking changes, estimate risk scores, and learn safe migration patterns.

Take the Challenge
📖

Migration Recipes

Copy-paste ready ALTER TABLE scripts for 10 common schema changes. PostgreSQL, MySQL, SQLite, SQL Server, and Oracle.

View Recipes
🔗

Add Foreign Key Guide

Step-by-step guide to adding FOREIGN KEY constraints in PostgreSQL, MySQL, SQLite, SQL Server, and Oracle with safety warnings.

View Guide

Create Index Guide

Complete CREATE INDEX reference for all 5 dialects. Covers composite, covering, partial, and online index builds.

View Guide
🗃️

SQLite ALTER TABLE

SQLite's ALTER TABLE is limited. Learn what works, what doesn't, and the safe table-recreation workaround.

View Guide
⏱️

Zero-Downtime Migration Guide

Alter tables without locking users out. Covers PostgreSQL, MySQL, SQLite, SQL Server, and Oracle with copy-paste scripts.

View Guide
📤

Schema Export Guide

Export CREATE TABLE statements from DataGrip, DBeaver, TablePlus, pgAdmin, MySQL Workbench, SSMS, and SQLite Browser.

View Guide
🔒

CHECK Constraint Generator

Generate intelligent CHECK constraints from your CREATE TABLE statements. Detects emails, prices, ages, statuses, URLs, and 15+ more patterns.

Generate Constraints
🔔

SQL Trigger Generator

Generate CREATE TRIGGER statements for all 5 dialects. Audit logs, auto-updated timestamps, prevent deletes, validation, and custom templates.

Generate Trigger
🏷️

SQL Rename Generator

Generate RENAME COLUMN and RENAME TABLE scripts for all 5 dialects. Smart suggestions detect similar names automatically with Levenshtein distance.

Generate Rename
📊

SQL CREATE INDEX Generator

Generate CREATE INDEX statements for all 5 dialects. Unique, partial, covering, and concurrent indexes with proper syntax for every database.

Generate Index
👁️

SQL CREATE VIEW Generator

Generate CREATE VIEW statements for all 5 dialects. Simple, materialized, recursive CTE, and schemabound views with copy-ready output.

Generate View
🗑️

SQL DROP Statement Generator

Generate safe DROP statements for tables, columns, indexes, views, triggers, and functions. IF EXISTS, CASCADE, and dependency warnings for all 5 dialects.

Generate DROP
🪟

SQL Window Function Generator

Generate window function queries from CREATE TABLE schemas. ROW_NUMBER, RANK, LAG, LEAD, running totals, moving averages, and more for all 5 dialects.

Generate Window Function
📊

SQL GROUP BY Generator

Generate GROUP BY and aggregate queries from CREATE TABLE schemas. COUNT, SUM, AVG, MIN, MAX, HAVING, ROLLUP, CUBE, and GROUPING SETS for all 5 dialects.

Generate GROUP BY
📄

SQL Pagination Generator

Generate paginated SQL queries for all 5 dialects. OFFSET/LIMIT, FETCH NEXT, TOP, ROWNUM, cursor pagination, and keyset pagination.

Generate Pagination
🌿

SQL CTE Generator

Generate Common Table Expressions for all 5 dialects. Simple WITH clauses, recursive hierarchies, running totals, and multi-CTE queries.

Generate CTE
🔒

SQL Transaction Generator

Generate safe SQL transaction blocks for all 5 dialects. BEGIN, COMMIT, ROLLBACK, SAVEPOINTs, and isolation levels.

Generate Transaction

Simple, transparent pricing

Start free. Upgrade when you need more power.

Free

For side projects & quick checks

$0/mo
  • Diff up to 15 tables
  • Visual diff viewer
  • PostgreSQL, MySQL, SQLite
  • Local history (browser)
  • Migration generation
  • Export & share
Get Started

💡 Try Pro free for 24 hours — no email required

Team

For engineering teams

$29/mo
  • Everything in Pro
  • Shared team workspace
  • Slack notifications
  • Admin & user management
  • API access
  • SSO (coming soon)
Book a Demo

Frequently asked questions

How is SchemaLens different from a text diff?

A text diff (like Git) compares lines of text. If you reformat whitespace or rename a column, a text diff shows noise. SchemaLens parses CREATE TABLE statements into structured objects and compares them semantically. It understands that role_id INT changing to role_id BIGINT is a type change—not a deleted line and an added line.

I already have migrations. Why do I need SchemaLens?

If you already use a migration framework and trust your pipeline, you may not need SchemaLens for day-to-day work. SchemaLens shines in four specific situations: (1) comparing staging vs production schemas when drift has occurred, (2) reviewing migration PRs when you only have DDL dumps, (3) auditing legacy projects with no migration history, and (4) quick one-off checks on machines without your full toolchain. It is a complement to migration tools, not a replacement. Read more about when to use SchemaLens →

When should I use SchemaLens vs Liquibase or Flyway?

Use SchemaLens for quick ad-hoc comparisons when you have two DDL dumps and need answers in 10 seconds. Use Liquibase or Flyway for managed migration lifecycles in CI/CD. SchemaLens is a complement, not a replacement. See the full comparison →

Is there a command-line version?

Yes. schemalens-cli is available on npm and runs the exact same engine locally. No API calls, no data leaves your machine. npx schemalens-cli diff old.sql new.sql --dialect postgres. CLI documentation →

Does SchemaLens connect to my live database?

No. SchemaLens compares DDL text (CREATE TABLE statements), not live database objects. Paste your schema dumps from pg_dump, mysqldump, or your ORM. This is intentional: it means zero configuration, zero credentials, and zero risk.

Is my schema data private?

Yes. All parsing and diffing happens in your browser. Your schemas never touch our servers. We use no tracking cookies. We cannot see your data even if we wanted to. Read about our architecture →

How does rename detection work?

SchemaLens uses a Levenshtein distance heuristic to detect likely renames. If a column (or table) disappears and a new one appears with the same type and a similar name (e.g., user_nameusername), it is flagged as a rename rather than a drop+add. This preserves data during migration generation. You can adjust sensitivity via the renameThreshold option in the CLI and engine.

Stop writing migrations by hand.

Catch schema drift before it hits production. Built for developers who ship with confidence.

Try SchemaLens Free

Built for the $100 AI Startup Race. Follow our public journey.

Get schema migration tips in your inbox

New features, blog posts, and best practices. No spam. Unsubscribe anytime.

📋 Grab the free Migration Safety Checklist

12 checks that prevent production schema disasters. Used by developers shipping migrations daily.

  • Verify defaults on NOT NULL additions
  • Confirm dropped columns are truly unused
  • Check index coverage on new foreign keys
  • Assess lock duration on large tables
  • + 8 more production-hardened checks
No spam. Unsubscribe anytime. We never share your email.