Schema Diff
Compare two database schemas and generate migration scripts instantly. Supports PostgreSQL, MySQL, SQLite, and SQL Server.
Compare SchemasSchema Diff Examples
Explore 6 real-world database migrations with one click. See soft deletes, multi-tenant migrations, breaking changes, and more.
Explore ExamplesEmbed Widget
Generate an embeddable iframe widget to display live schema diffs in your documentation, blog, or README.
Generate EmbedVS 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.
Install ExtensionChrome 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.
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
GitHub Action
Automated schema diff checks in your CI/CD pipeline. Catch breaking changes in every PR. Free tier requires no license key.
Add to WorkflowGitHub 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 WorkflowSchemaLens 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 BookmarkletSchema 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 CommandSchema 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 ReportGitHub PR Schema Diff
Paste any public GitHub PR URL and instantly review the schema changes. Generate PR comments with breaking-change warnings.
Review PRGit 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.
Diff Branches1-Click Schema Diff
Ultra-minimal landing page — two textareas, one button, instant diff results. Perfect for ad campaigns and quick schema checks with zero friction.
Diff NowSQL Validator
Validate CREATE TABLE syntax for PostgreSQL, MySQL, SQLite, and SQL Server. Catch errors before running migrations.
Validate SQLSQL Formatter
Beautify SQL queries with proper indentation, keyword casing, and syntax highlighting. Copy-paste ready.
Format SQLREADME Badge Generator
Create custom SVG badges for your GitHub READMEs, blog posts, and shared schema diffs. Multiple styles, instant preview.
Generate BadgeSchema Badge Generator
Add a live schema health badge to your README. Shows table count and a letter grade based on best practices.
Generate Schema BadgeSchema Documentation Generator
Generate beautiful HTML documentation from your CREATE TABLE statements. Export to Markdown or HTML.
Generate DocsCSV to SQL Converter
Convert CSV files to CREATE TABLE and INSERT statements. Auto-detects column types and delimiters.
Convert CSVJSON to SQL Schema
Convert JSON objects to CREATE TABLE statements. Handles nested objects, arrays, and auto-detects types.
Convert JSONCREATE TABLE Generator
Build CREATE TABLE statements visually. Add columns, set types, and choose constraints. Generate SQL for all major dialects.
Generate Table Alter TableSchema Templates
Production-ready SQL schema templates for blogs, e-commerce, SaaS, chat, and more. Copy-paste and customize.
Browse TemplatesSQL 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.
Generate INSERTSQL Test Data Generator
Generate realistic fake INSERT statements from your CREATE TABLE definition. Names, emails, dates, UUIDs, and more — all matched to column types.
Generate Test DataSQL 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.
Mask DataSQL 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.
Visualize JOINsSQL Data Types Reference
Complete data types cheat sheet across PostgreSQL, MySQL, SQL Server, SQLite, and Oracle. Find equivalents and migration mappings instantly.
Open ReferenceSchema Health Check
Lint your schema for missing primary keys, unindexed foreign keys, missing timestamps, and other design issues.
Check HealthSQL Schema Roast
Get your database schema roasted with humorous but genuinely helpful feedback. Generate shareable roast cards.
Get RoastedSQL Dialect Translator
Convert CREATE TABLE statements between PostgreSQL, MySQL, SQLite, SQL Server, and Oracle with type mapping and syntax adaptation.
Translate SQLSQL Test Data Generator
Generate realistic INSERT statements from CREATE TABLE definitions. Smart column-name detection for emails, names, prices, dates, and more.
Generate DataSchema Normalization Checker
Check your CREATE TABLE statements for 1NF, 2NF, and 3NF violations. Learn database normalization with real fix suggestions.
Check NormalizationSafe Migration Checker
Audit migration scripts for dangerous operations before production. Detects unsafe ALTER TABLE, missing defaults, lock risks, and data loss hazards.
Check SafetyReserved 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.
Check NamesNaming Convention Checker
Audit your SQL schema against engineering naming conventions. Detect inconsistent case styles, reserved words, bad abbreviations, missing timestamps, and soft-delete antipatterns.
Check NamingSQL 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 ClauseSQL 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.
Convert to ORMSQL 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.
Generate TypesSQL 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.
Generate PythonSQL 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.
Generate GoSQL to Java Generator
Convert CREATE TABLE statements to Java JPA Entity classes with Hibernate annotations. Lombok, Jackson, and Jakarta EE support. All 5 dialects.
Generate JavaSQL 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 RustSQL SELECT Generator
Generate SELECT statements from CREATE TABLE schemas. Auto-detects JOINs from foreign keys. Supports PostgreSQL, MySQL, SQLite, SQL Server, and Oracle.
Generate SELECTSQL 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.
Generate UPDATESQL 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.
Generate DELETESQL 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.
Generate UPSERTSQL 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.
Generate CASESQL Query Explainer
Paste any SQL query and get a plain-English breakdown of what it does. Explains JOINs, CTEs, window functions, subqueries, and more.
Explain QueryConnection String Parser
Parse and build database connection strings for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Auto-detect dialect, extract components, and generate URLs.
Parse StringSchema Mistake Quiz
Test your database design knowledge. Spot 7 common schema mistakes in 60 seconds — missing PKs, unindexed FKs, password storage, and more.
Take QuizBreaking 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.
Take QuizSchema Guessr
Can you guess the famous app just by looking at its database schema? 5 rounds of schema trivia with shareable results.
Play NowSchema Diff Weekly Challenge
Weekly schema diff challenges from real open-source projects. Spot breaking changes, estimate risk scores, and learn safe migration patterns.
Take ChallengeSchema Diff Speed Challenge
Race the clock to spot schema changes manually, then see how SchemaLens finds them instantly. A fun speed test for developers.
Start ChallengeSchema 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.
PracticeFamous Database Schemas
Explore the database schemas behind Twitter, Uber, E-commerce, Chat, URL Shortener, and CMS. ERD diagrams + copy-ready SQL for every schema.
ExploreSchema Design Patterns
10 essential database design patterns with real SQL examples and SchemaLens diffs. Soft deletes, audit logs, multi-tenancy, tagging, and more.
Learn PatternsSchema 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.
See MistakesSQL Index Analyzer
Find missing indexes, unindexed foreign keys, duplicate indexes, and query-specific index gaps. Get CREATE INDEX recommendations.
Analyze IndexesER Diagram Generator
Generate visual entity-relationship diagrams from your CREATE TABLE statements. Export as SVG. Perfect for documentation and team sharing.
Generate DiagramMermaid ERD Converter
Convert SQL CREATE TABLE statements to Mermaid ERD syntax with live diagram preview. Copy into GitHub READMEs, Notion, and Obsidian.
Convert to MermaidDBML Converter
Convert SQL CREATE TABLE statements to DBML (Database Markup Language) with relationships and indexes. Import into dbdiagram.io and other DBML tools.
Convert to DBMLPlantUML 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.
Convert to PlantUMLOpenAPI / 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.
Convert to OpenAPIMigration Cost Calculator
Calculate the real annual cost of writing database migration scripts manually. Most teams spend $10,000+ without realizing it.
Calculate CostVideo Tips
Free 60-second video guides on SQL schema diff, breaking changes, migration review, and safe database deployments. Watch, learn, share.
Watch TipsMigration Recipes
Copy-paste ready ALTER TABLE scripts for 10 common schema changes across PostgreSQL, MySQL, SQLite, SQL Server, and Oracle.
View RecipesAdd Foreign Key Guide
Step-by-step guide to adding FOREIGN KEY constraints with ON DELETE CASCADE, naming conventions, and performance tips.
View GuideCreate Index Guide
Complete CREATE INDEX reference covering single-column, composite, covering, partial, and online index builds.
View GuideSQLite ALTER TABLE
SQLite's ALTER TABLE limitations explained with safe table-recreation workarounds for unsupported operations.
View GuideZero-Downtime Migration Guide
Production-safe schema change strategies for all 5 dialects. pt-online-schema-change, gh-ost, CONCURRENTLY, and expand/contract pattern.
View GuideSchema Export Guide
Step-by-step instructions for exporting CREATE TABLE statements from DataGrip, DBeaver, TablePlus, pgAdmin, MySQL Workbench, SSMS, and SQLite Browser.
View GuideCHECK Constraint Generator
Generate intelligent CHECK constraints from CREATE TABLE statements. Auto-detects 20+ column patterns including emails, prices, ages, statuses, URLs, coordinates, and more.
Generate ConstraintsSQL 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.
Generate TriggerSQL 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.
Generate RenameSQL CREATE INDEX Generator
Generate CREATE INDEX statements for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Unique, partial, covering, and concurrent indexes.
Generate IndexSQL CREATE VIEW Generator
Generate CREATE VIEW statements for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Simple, materialized, recursive, and schemabound views.
Generate ViewSQL DROP Statement Generator
Generate safe DROP statements for tables, columns, indexes, views, triggers, and functions. IF EXISTS, CASCADE, and dependency warnings.
Generate DROPSQL Window Function Generator
Generate window function queries from CREATE TABLE schemas. ROW_NUMBER, RANK, LAG, LEAD, running totals, moving averages, and more.
Generate Window FunctionSQL GROUP BY Generator
Generate GROUP BY and aggregate queries from CREATE TABLE schemas. COUNT, SUM, AVG, MIN, MAX, HAVING, ROLLUP, CUBE, and GROUPING SETS.
Generate GROUP BYSQL Pagination Generator
Generate paginated SQL queries for all 5 dialects. OFFSET/LIMIT, FETCH NEXT, TOP, ROWNUM, cursor pagination, and keyset pagination.
Generate PaginationSQL CTE Generator
Generate Common Table Expressions for all 5 dialects. Simple WITH clauses, recursive hierarchies, running totals, and multi-CTE queries.
Generate CTESQL Transaction Generator
Generate safe SQL transaction blocks for all 5 dialects. BEGIN, COMMIT, ROLLBACK, SAVEPOINTs, and isolation levels.
Generate TransactionWhy 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.