🚀 Launch week special — lock in early-access pricing before it goes up. View pricing →
🔀

Schema Diff

Compare two database schemas and generate migration scripts instantly. Supports PostgreSQL, MySQL, SQLite, and SQL Server.

Flagship tool · 4 dialects · Export to Markdown/PDF/SQL
Compare Schemas
📚

Schema Diff Examples

Explore 6 real-world database migrations with one click. See soft deletes, multi-tenant migrations, breaking changes, and more.

6 curated examples · PostgreSQL & MySQL · No setup
Explore Examples
🖼️

Embed Widget

Generate an embeddable iframe widget to display live schema diffs in your documentation, blog, or README.

Live preview · Auto-generated code · 5 dialects
Generate Embed
🖥️

VS Code Extension

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

VS Code · Auto-detect dialect · One-click diff
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. Free on the Web Store.

GitHub · Auto-detect dialect · One-click diff
Install Extension 👁️ See PR Demo
⚙️

schema-diff CLI

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

Learn More
🧙

GitHub Action

Automated schema diff checks in your CI/CD pipeline. Catch breaking changes in every PR. Free tier requires no license key.

CI/CD · PR comments · Breaking change detection
Add to Workflow
🧙

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.

CI/CD · Workflow generator · Zero config
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.

All browsers · No install · One-click diff
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.

curl · 5 dialects · CI-ready
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.

PDF · Markdown · 5 dialects
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.

GitHub API · Public repos · PR comments
Review PR
🌿

Git Branch Schema Diff

Compare database schema files between any two Git branches, tags, or commits. Fetch from public GitHub repos and diff instantly. Perfect for reviewing framework upgrades.

GitHub · Branches · Tags · Commits
Diff Branches

SQL Validator

Validate CREATE TABLE syntax for PostgreSQL, MySQL, SQLite, and SQL Server. Catch errors before running migrations.

4 dialects · Instant feedback
Validate SQL

SQL Formatter

Beautify SQL queries with proper indentation, keyword casing, and syntax highlighting. Copy-paste ready.

4 dialects · UPPER/lower/preserve · Copy to clipboard
Format SQL
🔖

README Badge Generator

Create custom SVG badges for your GitHub READMEs, blog posts, and shared schema diffs. Multiple styles, instant preview.

4 styles · Markdown & HTML · Affiliate ref support
Generate Badge
🏥

Schema Badge Generator

Add a live schema health badge to your README. Shows table count and a letter grade based on best practices.

Auto-updating · Health score A-F · SVG badge
Generate Schema Badge
📄

Schema Documentation Generator

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

4 dialects · Export Markdown/HTML
Generate Docs
📊

CSV to SQL Converter

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

4 dialects · Auto type detection · Batch inserts
Convert CSV
🗂️

JSON to SQL Schema

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

4 dialects · Nested objects · Timestamps
Convert JSON
🏗️

CREATE TABLE Generator

Build CREATE TABLE statements visually. Add columns, set types, and choose constraints. Generate SQL for all major dialects.

4 dialects · Visual builder · Copy-paste ready
Generate Table Alter Table
📋

Schema Templates

Production-ready SQL schema templates for blogs, e-commerce, SaaS, chat, and more. Copy-paste and customize.

8 templates · PostgreSQL/MySQL/SQLite · Free
Browse Templates
📝

SQL INSERT Generator

Generate INSERT statements visually. Add columns, fill rows, and get batch INSERT or UPSERT syntax for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle.

5 dialects · Batch inserts · UPSERT support
Generate INSERT
🎲

SQL Test Data Generator

Generate realistic fake INSERT statements from your CREATE TABLE definition. Names, emails, dates, UUIDs, and more — all matched to column types.

5 dialects · Type-aware fake data · 20+ generators
Generate Test Data
🎭

SQL Data Masking Generator

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

5 dialects · 30+ PII patterns · GDPR-ready
Mask Data
🔗

SQL JOIN Visualizer

Interactive visual guide to SQL JOINs. Explore INNER, LEFT, RIGHT, FULL OUTER, CROSS, and SELF JOIN with live data, Venn diagrams, and generated SQL.

6 JOIN types · Live data · SQL generation
Visualize JOINs
📊

SQL Data Types Reference

Complete data types cheat sheet across PostgreSQL, MySQL, SQL Server, SQLite, and Oracle. Find equivalents and migration mappings instantly.

5 dialects · Searchable · Migration-ready
Open Reference
🏥

Schema Health Check

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

10 checks · Score 0-100 · Actionable fixes
Check Health
🔥

SQL Schema Roast

Get your database schema roasted with humorous but genuinely helpful feedback. Generate shareable roast cards.

6 categories · Shareable cards · Fix suggestions
Get Roasted
🌐

SQL Dialect Translator

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

5 dialects · 100+ type mappings · Copy-ready SQL
Translate SQL
🎲

SQL Test Data Generator

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

5 dialects · Smart detection · Bulk generation
Generate Data
📐

Schema Normalization Checker

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

3NF analysis · Educational · Fix SQL included
Check Normalization
🛡️

Safe Migration Checker

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

12 checks · 5 dialects · Safety score
Check Safety
⚠️

Reserved Words Checker

Check table and column names against SQL reserved words for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Prevent quoting headaches and migration failures.

5 dialects · Instant check · Rename suggestions
Check Names
🏷️

Naming Convention Checker

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

10 checks · Score 0-100 · 5 dialects
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.

Auto-detect · 5 dialects · Copy + download
Build IN Clause
🔄

SQL to ORM Converter

Convert SQL CREATE TABLE statements to Prisma or Drizzle ORM schemas instantly. Full type mapping, relation detection, and constraint handling across all 5 dialects.

Prisma + Drizzle · 5 dialects · Copy + download
Convert to ORM
📘

SQL to TypeScript Generator

Generate TypeScript interfaces and Zod validation schemas from CREATE TABLE statements. Smart type mapping, enum detection, and nullable handling for all 5 dialects.

TypeScript + Zod · 5 dialects · Copy + download
Generate Types
🐍

SQL to Python Generator

Generate Python SQLAlchemy ORM models and Pydantic validation schemas from CREATE TABLE statements. Smart type mapping, relation detection, and enum handling for all 5 dialects.

SQLAlchemy + Pydantic · 5 dialects · Copy + download
Generate Python
🐹

SQL to Go Generator

Convert CREATE TABLE statements to Go structs with json, db, and GORM tags. Smart type mapping, nullable sql.Null* types, and relation detection for all 5 dialects.

Go structs · json/db/GORM tags · 5 dialects · Copy + download
Generate Go

SQL to Java Generator

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

JPA Entities · Hibernate · Lombok · Jackson · 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.

Rust structs · Serde · sqlx · Diesel · 5 dialects
Generate Rust
🔍

SQL SELECT Generator

Generate SELECT statements from CREATE TABLE schemas. Auto-detects JOINs from foreign keys. Supports PostgreSQL, MySQL, SQLite, SQL Server, and Oracle.

5 dialects · Auto JOINs · Copy output
Generate SELECT
✏️

SQL UPDATE Generator

Generate UPDATE statements from CREATE TABLE schemas. Smart SET placeholders, primary-key WHERE clauses, JOIN updates, and bulk UPDATE patterns. Supports all 5 dialects.

5 dialects · JOIN updates · Bulk CASE · Copy output
Generate UPDATE
🗑️

SQL DELETE Generator

Generate safe DELETE statements from CREATE TABLE schemas. Primary-key WHERE clauses, JOIN deletes, soft-delete patterns, bulk DELETE, and TRUNCATE. Supports all 5 dialects.

5 dialects · JOIN deletes · Soft delete · Copy output
Generate DELETE

SQL UPSERT & MERGE Generator

Generate UPSERT and MERGE statements from CREATE TABLE schemas. ON CONFLICT, ON DUPLICATE KEY, MERGE INTO, RETURNING/OUTPUT, and bulk patterns. Supports all 5 dialects.

5 dialects · MERGE · Bulk upsert · Copy output
Generate UPSERT
🔀

SQL CASE WHEN Generator

Generate CASE WHEN statements from CREATE TABLE schemas. Equality mapping, range buckets, NULL handling, conditional aggregation, and UPDATE with CASE. Supports all 5 dialects.

5 dialects · Range buckets · Conditional aggregates · Copy output
Generate CASE
💬

SQL Query Explainer

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

All query types · Clause-by-clause · Complexity score
Explain Query
🔗

Connection String Parser

Parse and build database connection strings for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Auto-detect dialect, extract components, and generate URLs.

5 dialects · Parse + Build · Key-value & URL formats
Parse String
🧠

Schema Mistake Quiz

Test your database design knowledge. Spot 7 common schema mistakes in 60 seconds — missing PKs, unindexed FKs, password storage, and more.

7 questions · Instant scoring · Share results
Take Quiz
🚨

Breaking Change Quiz

Can you spot the migrations that break production? 10 real-world schema diffs — from NOT NULL additions to precision loss and view breakage.

10 questions · Before/after diffs · Share results
Take Quiz
🧩

Schema Guessr

Can you guess the famous app just by looking at its database schema? 5 rounds of schema trivia with shareable results.

5 rounds · GitHub, YouTube, Airbnb & more · Share score
Play Now
🔥

Schema Diff Weekly Challenge

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

4 challenges · Real-world schemas · Risk scoring
Take Challenge

Schema Diff Speed Challenge

Race the clock to spot schema changes manually, then see how SchemaLens finds them instantly. A fun speed test for developers.

3 rounds · Timed · Shareable score
Start Challenge
🎤

Schema Design Interviews

Practice real SQL schema design questions from Twitter, Uber, and URL shortener. Write your solution, reveal the expert answer, and diff them side-by-side.

3 challenges · Expert solutions · Diff comparison
Practice
🌍

Famous Database Schemas

Explore the database schemas behind Twitter, Uber, E-commerce, Chat, URL Shortener, and CMS. ERD diagrams + copy-ready SQL for every schema.

6 schemas · 60+ tables · Live ERD diagrams
Explore
📐

Schema Design Patterns

10 essential database design patterns with real SQL examples and SchemaLens diffs. Soft deletes, audit logs, multi-tenancy, tagging, and more.

10 patterns · Copy-ready SQL · Before/after diffs
Learn Patterns
🚨

Schema Anti-Patterns

10 common schema mistakes that blow up in production. Real SQL examples of the wrong way and the right way with SchemaLens diffs.

10 anti-patterns · Before/after fixes · Copy-ready SQL
See Mistakes
📈

SQL Index Analyzer

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

Schema + query analysis · 4 dialects · Copy indexes
Analyze Indexes
🕸️

ER Diagram Generator

Generate visual entity-relationship diagrams from your CREATE TABLE statements. Export as SVG. Perfect for documentation and team sharing.

4 dialects · SVG export · Mermaid source
Generate Diagram
🧜

Mermaid ERD Converter

Convert SQL CREATE TABLE statements to Mermaid ERD syntax with live diagram preview. Copy into GitHub READMEs, Notion, and Obsidian.

5 dialects · Live preview · Mermaid export
Convert to Mermaid
🗂️

DBML Converter

Convert SQL CREATE TABLE statements to DBML (Database Markup Language) with relationships and indexes. Import into dbdiagram.io and other DBML tools.

5 dialects · Relationships · Index export
Convert to DBML
🌿

PlantUML ERD Converter

Convert SQL CREATE TABLE statements to PlantUML ERD syntax with relationships, keys, and cardinality. Generate .puml files for Confluence, documentation, and team wikis.

5 dialects · Cardinality · .puml export
Convert to PlantUML
📡

OpenAPI / JSON Schema Converter

Convert SQL CREATE TABLE statements to OpenAPI 3.0 component schemas and JSON Schema. Smart SQL-to-OpenAPI type mapping, CHECK constraint enum detection, nullable handling, and default values.

5 dialects · OpenAPI + JSON Schema · Enum detection
Convert to OpenAPI
💰

Migration Cost Calculator

Calculate the real annual cost of writing database migration scripts manually. Most teams spend $10,000+ without realizing it.

Instant estimate · Team-sized · Incident-aware
Calculate Cost
🎬

Video Tips

Free 60-second video guides on SQL schema diff, breaking changes, migration review, and safe database deployments. Watch, learn, share.

5 videos · 60-second format · Scripts included
Watch Tips
📖

Migration Recipes

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

10 recipes · 5 dialects · Safety notes
View Recipes
🔗

Add Foreign Key Guide

Step-by-step guide to adding FOREIGN KEY constraints with ON DELETE CASCADE, naming conventions, and performance tips.

5 dialects · Referential actions · Safety warnings
View Guide

Create Index Guide

Complete CREATE INDEX reference covering single-column, composite, covering, partial, and online index builds.

5 dialects · Composite & covering · Online builds
View Guide
🗃️

SQLite ALTER TABLE

SQLite's ALTER TABLE limitations explained with safe table-recreation workarounds for unsupported operations.

SQLite-specific · Version requirements · Workarounds
View Guide
⏱️

Zero-Downtime Migration Guide

Production-safe schema change strategies for all 5 dialects. pt-online-schema-change, gh-ost, CONCURRENTLY, and expand/contract pattern.

5 dialects · Online DDL · Copy-paste scripts
View Guide
📤

Schema Export Guide

Step-by-step instructions for exporting CREATE TABLE statements from DataGrip, DBeaver, TablePlus, pgAdmin, MySQL Workbench, SSMS, and SQLite Browser.

7 GUI tools · 5 dialects · Copy-paste ready
View Guide
🔒

CHECK Constraint Generator

Generate intelligent CHECK constraints from CREATE TABLE statements. Auto-detects 20+ column patterns including emails, prices, ages, statuses, URLs, coordinates, and more.

20+ patterns · 5 dialects · Copy + download
Generate Constraints
🔔

SQL Trigger Generator

Generate CREATE TRIGGER statements for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Audit logs, auto-updated timestamps, prevent deletes, validation, cascade updates, and custom templates.

6 patterns · 5 dialects · Copy + download
Generate Trigger
🏷️

SQL Rename Generator

Generate RENAME COLUMN and RENAME TABLE scripts for all 5 dialects. Smart suggestions use Levenshtein distance to detect similar names and common abbreviation patterns.

Smart suggest · 5 dialects · Copy + download
Generate Rename
📊

SQL CREATE INDEX Generator

Generate CREATE INDEX statements for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Unique, partial, covering, and concurrent indexes.

Unique · Partial · Covering · Concurrent · 5 dialects
Generate Index
👁️

SQL CREATE VIEW Generator

Generate CREATE VIEW statements for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Simple, materialized, recursive, and schemabound views.

Simple · Materialized · Recursive · SCHEMABINDING · 5 dialects
Generate View
🗑️

SQL DROP Statement Generator

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

Safe · IF EXISTS · CASCADE · Dependency Warnings · 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.

11 functions · PARTITION BY · ORDER BY · Frame clauses · 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.

6 patterns · Aggregates · HAVING · ROLLUP · CUBE · 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.

3 patterns · OFFSET/LIMIT · Keyset · Cursor · 5 dialects
Generate Pagination
🌿

SQL CTE Generator

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

3 patterns · Simple · Recursive · Multi-CTE · 5 dialects
Generate CTE
🔒

SQL Transaction Generator

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

3 patterns · Basic · Savepoint · Exception Handling · 5 dialects
Generate Transaction

Why browser-based?

Privacy first. Your SQL never touches our servers. All parsing, formatting, and diffing happens locally in your browser. Perfect for sensitive schemas in finance, healthcare, and government.

Zero friction. No install. No account. No permissions. Open the page and start working.

Fast. No network latency. A 500-line schema parses and formats in under 10 milliseconds.