SQL Diff Tool
Paste two SQL scripts and see exactly what changed — added, removed and modified lines, side by side. Free, no signup, and your SQL never leaves your browser.
Private by design
Script comparison runs entirely in your browser. Nothing is uploaded, nothing is stored, and it works offline once the page has loaded.
Instant results
A Myers diff — the same algorithm git uses — compares thousands of lines in milliseconds as you type. No upload, no queue, no waiting.
Scripts or databases
Diff SQL text for migrations and schema reviews, or compare two SQLite .db files table by table to find changed rows.
Need to compare two SQLite databases?
Upload two .db files and get a table-by-table breakdown of added, removed and modified rows, plus schema differences. Database comparison requires an account because files are processed on our servers.
Frequently asked questions
Is this SQL diff tool free?+
Yes. Comparing SQL scripts is free and unlimited, with no account required. The comparison runs in your browser, so there is no server cost to pass on to you.
Is my SQL uploaded to a server?+
No. The text comparison happens entirely in your browser using JavaScript. Your SQL never leaves your device, which makes the tool safe to use with production schemas and queries.
What is the difference between this and sqldiff?+
sqldiff is the official SQLite command-line utility that compares two .db database files and emits the SQL needed to transform one into the other. This tool compares SQL text — scripts, schemas, migrations and queries — in the browser, with no install. If you want to compare actual .db files here, use the database comparison feature.
Can I compare two database files instead of scripts?+
Yes. The SQLite database comparison feature compares two .db files table by table and reports added, removed and modified rows along with schema changes.
Does it work with MySQL, PostgreSQL and SQL Server?+
Yes for script comparison. The diff is dialect-agnostic, so it works with MySQL, PostgreSQL, SQL Server, Oracle, SQLite or any other SQL text — including migration files and stored procedures.
How large a SQL file can it compare?+
Two scripts with up to 60,000 lines between them get a full line-by-line diff. In our tests, two 5,000-line schema dumps diff in about 2 milliseconds and two 25,000-line dumps in about 10 milliseconds. Between 60,000 and 300,000 lines the comparison switches to a coarser block-level diff so your browser stays responsive. Above 300,000 lines it reports accurate counts of added and removed lines instead of a line-by-line view.
How large a database can I compare?+
Free: .db files up to 50MB, compared in your browser with nothing uploaded, and up to function(){throw Error("Attempted to call BROWSER_MAX_ROWS_PER_TABLE() from the server but BROWSER_MAX_ROWS_PER_TABLE is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")} rows per table; every difference within those rows is reported. Paid plans: files up to 200MB and up to 500,000 rows per table, compared on our servers. Every row is compared, up to 50,000 differences per table are sent to your screen, and the complete result can be downloaded. In one of our tests, two 181MB databases with 323,625 rows each were compared in about 14 seconds, not counting upload time. Speed depends heavily on how wide the rows are.
Stay updated
Occasional SQL tips and new tools. No spam, unsubscribe anytime.