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.
No account required. No data leaves your device.
🛡️ Reviewing a migration? Use our Database Migration Safety Checklist
npx schemalens-cli
Built for Engineers
Stop squinting at text diffs. Get a semantic, visual comparison that understands your schema.
Not a line-by-line text comparison. We understand tables, columns, types, defaults, indexes, and constraints.
Generate ALTER TABLE scripts in PostgreSQL, MySQL, or SQLite dialects. Copy, paste, deploy.
All processing happens in your browser. Your schemas never touch our servers. Perfect for sensitive data.
PostgreSQL, MySQL, MariaDB, SQLite support out of the box. More dialects coming based on demand.
Download diffs as Markdown, PDF, or raw SQL. Share a link with your team for async review.
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.
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 →
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 →
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 →
From schema dumps to migration scripts in three simple steps.
Copy your old schema dump — from pg_dump, mysqldump, or your ORM — and paste it into the left pane.
Paste the new schema into the right pane. SchemaLens parses both instantly, understanding structure — not just text.
See every change highlighted. Generate migration SQL in your dialect. Export, share, or copy into your migration tool.
Not a replacement for your migration framework. A precision tool for the moments when you need answers now.
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.
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.
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.
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 →
Watch SchemaLens diff a real schema and generate the migration script — no setup required.
See a 3-table blog schema evolve with new columns, types, and tables.
Run PostgreSQL DemoWatch auto-increment keys, foreign keys, and index changes get detected.
Run MySQL DemoCompare NVARCHAR schemas with IDENTITY columns and computed fields.
Run SQL Server DemoDetect VARCHAR2 changes, NUMBER precision shifts, and new constraints.
Run Oracle DemoHandy utilities that run in your browser. No signup required.
Paste CREATE TABLE statements and get instant validation for PostgreSQL, MySQL, SQLite, and SQL Server.
Beautify messy SQL queries with proper indentation, keyword casing, and syntax highlighting.
Format SQLCompare two database schemas and generate migration scripts in seconds. Our flagship tool.
Compare SchemasCompare schema files between Git branches, tags, or commits. Fetch from public GitHub repos instantly.
Diff BranchesGenerate beautiful HTML documentation from your CREATE TABLE statements. Export to Markdown.
Generate DocsConvert CSV files to CREATE TABLE and INSERT statements. Auto-detects column types and delimiters.
Convert CSVConvert JSON objects to CREATE TABLE statements. Handles nested objects, arrays, and auto-detects types.
Convert JSONBuild CREATE TABLE statements visually. Add columns, set types, and choose constraints for any dialect.
Generate Table Alter TableProduction-ready database schemas for blogs, e-commerce, SaaS, chat, and more. Copy-paste and customize.
Browse TemplatesGenerate INSERT statements with batch support and UPSERT syntax. Supports all major SQL dialects.
Generate INSERTLearn SQL JOINs interactively with live data, Venn diagrams, and instant SQL generation. Covers all 6 JOIN types.
Visualize JOINsLint your schema for missing primary keys, unindexed foreign keys, and other design issues.
Check HealthGet your database schema roasted with humorous but genuinely helpful feedback. Shareable roast cards included.
Get RoastedConvert CREATE TABLE statements between PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Handles type mapping and syntax differences.
Translate SQLGenerate realistic INSERT statements from CREATE TABLE definitions. Smart column-name detection for emails, names, prices, and more.
Generate DataGenerate SQL UPDATE scripts to mask PII and anonymize sensitive columns. Auto-detects 30+ patterns for GDPR-compliant dev databases.
Mask DataCheck your CREATE TABLE statements for 1NF, 2NF, and 3NF violations. Learn normalization with real fix suggestions.
Check NormalizationAudit migration scripts for dangerous operations before production. Detects unsafe ALTER TABLE, missing defaults, and lock risks.
Check SafetyCheck table and column names against SQL reserved words for all 5 dialects. Prevent quoting headaches and migration failures.
Check NamesAudit your schema against engineering naming conventions. Detect inconsistent case styles, bad abbreviations, missing timestamps, and soft-delete antipatterns.
Check NamingConvert 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 ClauseConvert CREATE TABLE statements to Prisma or Drizzle schemas instantly. Supports all 5 dialects with full type mapping.
Convert to ORMGenerate TypeScript interfaces and Zod validation schemas from CREATE TABLE statements. Supports all 5 dialects.
Generate TypesGenerate SQLAlchemy ORM models and Pydantic schemas from CREATE TABLE statements. Supports all 5 dialects.
Generate PythonConvert CREATE TABLE statements to Go structs with json, db, and GORM tags. Supports all 5 dialects with sql.Null* nullable types.
Generate GoConvert CREATE TABLE statements to Java JPA Entity classes with Hibernate annotations, Lombok, and Jackson support. All 5 dialects.
Generate JavaConvert CREATE TABLE statements to Rust structs with Serde, sqlx, and Diesel annotations. Smart Option<T> for nullable, all 5 dialects.
Generate RustGenerate SELECT statements from CREATE TABLE schemas. Auto-detects JOINs from foreign keys across all 5 dialects.
Generate SELECTGenerate safe UPDATE statements from CREATE TABLE schemas. SET placeholders, PK WHERE clauses, JOIN updates, and bulk CASE patterns.
Generate UPDATEGenerate safe DELETE statements with primary-key WHERE clauses. Supports JOIN deletes, soft-delete patterns, bulk DELETE, and TRUNCATE.
Generate DELETEGenerate UPSERT and MERGE statements from CREATE TABLE schemas. ON CONFLICT, ON DUPLICATE KEY, MERGE INTO — all 5 dialects.
Generate UPSERTGenerate CASE WHEN statements from CREATE TABLE schemas. Equality maps, range buckets, conditional aggregates, and UPDATE patterns.
Generate CASEPaste any SQL query and get a plain-English breakdown of what it does. Explains JOINs, CTEs, window functions, and subqueries.
Explain QueryParse and build database connection strings for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Debug connection issues instantly.
Parse StringCompare SQL data types across 5 dialects. Find equivalents when migrating schemas.
Open ReferenceFind missing indexes, unindexed foreign keys, and query-specific index gaps. Get instant recommendations.
Analyze IndexesGenerate visual entity-relationship diagrams from your CREATE TABLE statements. Export as SVG.
Generate DiagramConvert SQL CREATE TABLE to Mermaid ERD syntax with live preview. Perfect for GitHub READMEs and Notion.
Convert to MermaidConvert SQL CREATE TABLE to DBML (Database Markup Language). Import into dbdiagram.io instantly.
Convert to DBMLConvert SQL CREATE TABLE to PlantUML ERD syntax. Generate entity-relationship diagrams for documentation and wikis.
Convert to PlantUMLConvert SQL CREATE TABLE to OpenAPI 3.0 and JSON Schema. Smart type mapping, enum detection, and nullable handling.
Convert to OpenAPISee what manual migrations actually cost your team. Most spend $10,000+ per year without realizing it.
Calculate CostFree 60-second video guides on schema diff, breaking changes, and safe migrations. Watch, learn, share.
Watch TipsGenerate realistic fake SQL test data instantly. Paste a CREATE TABLE statement and get INSERT statements for any dialect.
Generate DataTest your database design knowledge. Spot common schema mistakes before they hit production in 60 seconds.
Take QuizCan you spot the migrations that break production? 10 real-world schema changes. Test your migration safety skills.
Take QuizCan you guess the famous app just by looking at its database schema? A fun, shareable game for developers.
Play NowRace the clock to spot schema changes manually, then see how SchemaLens finds them instantly. How fast are your eyes?
Start ChallengePractice real SQL schema design questions from Twitter, Uber, and URL shortener. Compare your solution with expert answers.
PracticeExplore real-world SQL designs from Twitter, Uber, E-commerce, Chat, and more. With ERD diagrams and copy-ready CREATE TABLE statements.
Explore10 production-ready SQL patterns: soft deletes, audit logs, multi-tenancy, tagging, tree structures, and more. Copy-ready CREATE TABLE statements.
Learn Patterns10 common schema mistakes that cause outages and data loss. See the wrong way, the right way, and the diff between them.
See MistakesGenerate custom SVG badges for your GitHub READMEs and shared schema diffs. Embed diff status anywhere.
Make BadgeDiff two open SQL files directly from VS Code. Auto-detects dialect and opens SchemaLens with both schemas pre-filled.
Install ExtensionAdds 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.
Add a live schema diff iframe to your documentation, blog, or README. Auto-generated code with live preview.
Generate EmbedZero-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
Answer 4 questions, get a ready-to-use GitHub Actions workflow. No YAML guessing. Generates branch comparison, PR comments, and breaking-change gates.
Generate WorkflowDiff 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 BookmarkletDiff two database schemas from your terminal with a single curl command. No signup, no API key. Markdown diff + breaking change report.
Copy CommandGenerate beautiful branded PDF reports from any schema diff. Attach to Jira tickets, Linear issues, or GitHub PRs. Markdown export included.
Generate ReportPaste any public GitHub PR URL and instantly review the schema changes. Generate PR comments with breaking-change warnings.
Review PRExplore real-world database migrations with one click. See SchemaLens in action on soft deletes, multi-tenant migrations, and more.
Explore ExamplesWeekly schema diff challenges from real open-source projects. Spot breaking changes, estimate risk scores, and learn safe migration patterns.
Take the ChallengeCopy-paste ready ALTER TABLE scripts for 10 common schema changes. PostgreSQL, MySQL, SQLite, SQL Server, and Oracle.
View RecipesStep-by-step guide to adding FOREIGN KEY constraints in PostgreSQL, MySQL, SQLite, SQL Server, and Oracle with safety warnings.
View GuideComplete CREATE INDEX reference for all 5 dialects. Covers composite, covering, partial, and online index builds.
View GuideSQLite's ALTER TABLE is limited. Learn what works, what doesn't, and the safe table-recreation workaround.
View GuideAlter tables without locking users out. Covers PostgreSQL, MySQL, SQLite, SQL Server, and Oracle with copy-paste scripts.
View GuideExport CREATE TABLE statements from DataGrip, DBeaver, TablePlus, pgAdmin, MySQL Workbench, SSMS, and SQLite Browser.
View GuideGenerate intelligent CHECK constraints from your CREATE TABLE statements. Detects emails, prices, ages, statuses, URLs, and 15+ more patterns.
Generate ConstraintsGenerate CREATE TRIGGER statements for all 5 dialects. Audit logs, auto-updated timestamps, prevent deletes, validation, and custom templates.
Generate TriggerGenerate RENAME COLUMN and RENAME TABLE scripts for all 5 dialects. Smart suggestions detect similar names automatically with Levenshtein distance.
Generate RenameGenerate CREATE INDEX statements for all 5 dialects. Unique, partial, covering, and concurrent indexes with proper syntax for every database.
Generate IndexGenerate CREATE VIEW statements for all 5 dialects. Simple, materialized, recursive CTE, and schemabound views with copy-ready output.
Generate ViewGenerate safe DROP statements for tables, columns, indexes, views, triggers, and functions. IF EXISTS, CASCADE, and dependency warnings for all 5 dialects.
Generate DROPGenerate window function queries from CREATE TABLE schemas. ROW_NUMBER, RANK, LAG, LEAD, running totals, moving averages, and more for all 5 dialects.
Generate Window FunctionGenerate 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 BYGenerate paginated SQL queries for all 5 dialects. OFFSET/LIMIT, FETCH NEXT, TOP, ROWNUM, cursor pagination, and keyset pagination.
Generate PaginationGenerate Common Table Expressions for all 5 dialects. Simple WITH clauses, recursive hierarchies, running totals, and multi-CTE queries.
Generate CTEGenerate safe SQL transaction blocks for all 5 dialects. BEGIN, COMMIT, ROLLBACK, SAVEPOINTs, and isolation levels.
Generate TransactionStart free. Upgrade when you need more power.
For side projects & quick checks
💡 Try Pro free for 24 hours — no email required
For professional developers
For engineering teams
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.
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 →
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 →
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 →
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.
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 →
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_name → username), 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.
Catch schema drift before it hits production. Built for developers who ship with confidence.
Try SchemaLens FreeBuilt for the $100 AI Startup Race. Follow our public journey.
New features, blog posts, and best practices. No spam. Unsubscribe anytime.