Compare Two SQL Schemas Online
How to compare two SQL schemas: export each schema as DDL (mysqldump --no-data, pg_dump --schema-only, or .schema in sqlite3), paste both outputs into SQL Diff Tool, and review the highlighted CREATE TABLE, column, index and constraint changes. For live databases, pgAdmin Schema Diff or SSMS Schema Compare can also generate migration scripts.
Compare two schema dumps
Online DDL diff vs SSMS, DBeaver, or Atlas
Use this page when you already have two schema dumps (or cannot connect the live servers in a browser). Export each schema as DDL, paste both sides, and review CREATE TABLE, column, index and constraint differences — free in your browser, nothing uploaded. Use SSMS Schema Compare, DBeaver Schema Compare, or Atlas schema diff when you are connected to both databases and need a migration script (CREATE / ALTER / DROP) applied or generated for you. This tool shows the DDL text diff; it does not write the ALTER statements.
How to compare two SQL schemas
Export each schema as DDL, paste both into SQL Diff Tool, and review CREATE TABLE, column, index and constraint changes.
Export each schema as DDL
MySQL: mysqldump --no-data. PostgreSQL: pg_dump --schema-only. SQLite: sqlite3 .schema. SQL Server: SSMS Generate Scripts (Schema only) or OBJECT_DEFINITION exports. Run once per database.
MySQL
mysqldump --no-data --skip-comments --skip-dump-date \ -u user -p dbname > schema.sql
PostgreSQL
pg_dump --schema-only --no-comments \ -d dbname > schema.sql
SQLite
sqlite3 database.db .schema > schema.sql
Paste both outputs into SQL Diff Tool
Paste into the two panes on this page or the home page. Enable Ignore whitespace if dumps were formatted differently.
Review highlighted changes
Review CREATE TABLE, column, index and constraint differences. Removed lines on the left; added on the right.
Frequently asked questions
How do I compare two SQL schemas?+
Export each schema as DDL, paste the two outputs into SQL Diff Tool, and read the highlighted lines. CREATE TABLE statements, columns, indexes and constraints that differ show up as added or removed lines.
Which command exports a schema without the data?+
MySQL: mysqldump --no-data. PostgreSQL: pg_dump --schema-only. SQLite: sqlite3 .schema. SQL Server: SSMS Generate Scripts (Schema only) or OBJECT_DEFINITION exports. Run the command once per database so you have two DDL files to compare.
Can this generate the migration between two live databases?+
No. This page compares DDL text and shows what changed. pgAdmin Schema Diff and SSMS Schema Compare connect to live databases and can generate a migration script when that is what you need.
Should I use an online SQL schema diff or SSMS / DBeaver / Atlas?+
Choose an online DDL diff when you have two schema exports and want a private, free, in-browser line comparison. Choose SSMS Schema Compare, DBeaver Schema Compare, or Atlas schema diff when you can connect to both databases and need a migration script. SQL Diff Tool highlights what changed in the dumps; those desktop/CLI tools can generate the SQL to make one database match the other.