SQL Schema Diff Checker
Free online SQL schema diff tool. Compare two CREATE TABLE scripts and see added, dropped and changed columns, type changes, nullable flips, index diffs and rename suggestions, with ALTER TABLE migration statements. Runs entirely in your browser.
Loading tool...
What is SQL Schema Diff Checker?
The SQL Schema Diff Checker compares two sets of CREATE TABLE statements and reports exactly what changed: tables and columns added or dropped, column type changes, NULL to NOT NULL flips, default value changes, and index differences including changed column lists. It proposes MySQL-flavoured ALTER TABLE statements for the migration and flags a possible rename when one column disappears and one column of the same type appears. Everything is parsed locally in the browser with no database connection.
Key Benefits
- See every schema difference on one page instead of eyeballing two dumps
- Catch breaking changes: type changes and nullable flips before they hit production
- Get a ready-to-review list of ALTER TABLE statements
- Rename heuristic saves you from dropping and re-adding a renamed column
- No database access needed: paste DDL and compare instantly
Common Use Cases
- β’Reviewing an auto-generated migration before applying it
- β’Comparing staging and production schema dumps
- β’Checking that an ORM model matches the database DDL
- β’Auditing drift between two environments after a hotfix
- β’Documenting what changed between schema versions in a pull request
How to Compare Two SQL Schemas
- Paste the original schema: Drop the older CREATE TABLE statements, from a dump or a migration file, into the left box. Multiple tables are fine; every one of them is compared.
- Paste the new schema: Put the newer version of the same tables into the right box. Keep the same table names so the comparison can pair them up.
- Run the comparison: Press Compare schemas. The report lists added and dropped tables, added and dropped columns, type changes, nullable flips, default changes and index differences per table.
- Copy the migration: Review the suggested ALTER statements at the bottom, adjust anything the heuristic got wrong, and copy them into your migration file.
Key Features
- Parses CREATE TABLE DDL: columns, types, defaults, nullability and keys
- Added and dropped tables and columns reported side by side
- Type changes, nullable flips and default changes detected per column
- Index and primary key diffs, including changed column lists
- Rename heuristic when one column leaves and one of the same type arrives
- Copyable MySQL-flavoured ALTER statements for the migration