Schema Diff — Compare ER Diagrams
Paste your old and new diagrams, click Compare, and instantly see every change.
How Schema Diff Works
Paste your old diagram (the current state of your schema) on the left.
Paste your new diagram (the desired future state) on the right.
Click Compare to see every change, colour-coded by type and severity.
Both diagrams are parsed and normalised before comparison, so minor differences in whitespace or ordering never produce false positives. Green entries are safe additions; red entries are deletions that may cause data loss and are marked destructive; yellow entries are column modifications.
What changes are detected?
- Added / dropped tables — new tables in the target or tables removed from the baseline
- Added / dropped columns — new columns in a shared table, or columns that no longer appear
- Modified columns — type changes, nullability flips, or default value changes on existing columns
- Added / dropped indexes — new named indexes or removed indexes on shared tables
- Added / dropped foreign keys — relationship additions and removals between tables
Destructive changes
A change is marked destructive when it may cause irreversible data loss on a live database: dropping a table, dropping a column, changing a column's data type, or adding a NOT NULL constraint to a column that could contain existing NULL values. Use these signals to decide whether to take a backup before running migrations.
Want the SQL migration script?
The Schema Diff page shows what changed in human-readable form. If you need the actual ALTER TABLE / CREATE TABLE SQL to apply those changes to a database, use the POST /v1/convert/migration endpoint (Developer tier) or the Schema Diff documentation for API usage.
Next steps
Learn how to write ER diagrams or automate diff in your CI pipeline.
Frequently Asked Questions
- What is a schema diff?
- A schema diff compares two versions of a database schema — typically the current state and a proposed new state — and lists exactly what changed: which tables were added or removed, which columns were modified, and which relationships changed. It is the first step in planning a safe database migration.
- Which diagram formats are supported?
- Both Mermaid
erDiagramand PlantUML entity syntax are supported. You can also diff a Mermaid baseline against a PlantUML target (or vice versa) — the tool parses each diagram independently before comparing the resulting schemas. - What does "destructive" mean?
- A change is marked destructive when applying it to a live database could cause irreversible data loss: dropping a table, dropping a column, changing a column's data type (truncation risk), or adding a NOT NULL constraint without a default value (existing NULL rows would fail the constraint). Always take a backup before running destructive migrations.
- Does this generate migration SQL?
- The Schema Diff page shows human-readable change descriptions only — it does not generate SQL. To produce
ALTER TABLEmigration scripts for PostgreSQL, MySQL, SQLite, or Oracle, use thePOST /v1/convert/migrationAPI endpoint, which is available on the Developer plan. - Is the diff tool free?
- Yes — the Schema Diff page and the
POST /v1/diffAPI endpoint are completely free with no account required. The human-readable diff is always free; SQL migration generation requires a Developer plan. - Why does comparing identical diagrams produce changes?
- Before diffing, both schemas are normalised: tables without a primary key get a synthetic
idcolumn injected. If one diagram defines an explicit PK and the other does not, the diff will report a column modification even if the original diagrams look similar. Define explicit PKs in both diagrams for a clean zero-change result.