SQL Diff Tool

Compare two SQL queries or scripts side by side. Instantly see additions, deletions, and modifications. Free, no signup, and your SQL never leaves your browser.

What is SQL diff?

SQL diff means comparing two SQL artifacts to see what changed. It can mean a line-by-line comparison of query or script text, a comparison of schema structure such as tables, columns, and indexes, or a comparison of table or query-result data to find rows that were added, removed, or changed. Those are different jobs.

On sqldifftool.com, SQL Diff Tool keeps these as separate tools.

Query and script text

The SQL Diff Checker compares query and script text line by line in your browser and highlights additions, deletions, and changed lines. It does not parse or run the SQL. EXCEPT and MINUS are set-difference operators that compare rows inside a database; they are not this text comparison.

Schema structure

Compare SQL Schemas compares schema dumps as text. Paste two DDL exports to see added and removed lines for tables, columns, indexes, and constraints. It does not connect to live databases or generate ALTER statements that sync one schema to the other.

Table and query-result data

Comparing rows in a table, or rows a query returns, is a separate kind of diff. SQLite Diff compares SQLite .db files table by table. Free comparisons within the size and row limits stay in your browser; larger files are uploaded for a paid server comparison. MySQL, PostgreSQL, and SQL Server query results are not compared.

To compare two SQL scripts online, paste the original into the left pane and the changed version into the right. SQL Diff Tool highlights added, removed and changed lines side by side, using the Myers diff algorithm git uses. It works with any dialect (MySQL, PostgreSQL, SQL Server, SQLite), is free, and nothing leaves your browser.

Runs entirely in your browser — nothing is uploaded
− Original
+ Modified
Paste SQL into both panes to see the difference instantly.

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. Files up to 50MB are compared free in your browser and never uploaded. Larger files, up to 200MB and 500,000 rows per table, are compared on our servers with a paid account.

Compare SQLite databases

How to compare two SQL scripts online

  1. Paste both sides. Put the original script in the left pane and the changed version in the right.
  2. Read the highlights. Removed lines show on the left, added lines on the right. The diff uses the Myers algorithm git uses and updates as you type.
  3. Cut formatting noise. Enable Ignore whitespace or Ignore case when indentation or keyword casing is the only difference.
  4. Stay private. Script diffs run in your browser — nothing is uploaded. For SQLite .db files, use the database compare (free up to 50MB / 200,000 rows per table).

Frequently asked questions

What is SQL diff?+

SQL diff means comparing two SQL artifacts to see what changed. It can mean a line-by-line comparison of query or script text, a comparison of schema structure such as tables, columns, and indexes, or a comparison of table or query-result data to find rows that were added, removed, or changed. Those are different jobs.

Is SQL Diff Tool free, and do my SQL scripts leave my browser?+

Yes for text diffs: paste two scripts or queries and they are compared locally in your browser — free, no signup, nothing uploaded. SQLite schema text diffs work the same way. Free .db file compares stay in the browser up to 50MB / 200,000 rows per table; larger files use a paid server compare.

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 SQL Diff Tool compare SQLite databases, not just SQL text?+

Yes. On /sqlite-diff you can paste two .schema exports or upload two .db files for a table-by-table row and schema diff. Schema paste is free in-browser. .db compares are free up to 50MB and 200,000 rows per table; larger files need a paid account.

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 200,000 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.

How is SQL Diff Tool different from sqlformat.io, Aiven SQL Compare, or Text Compare?+

SQL Diff Tool compares SQL scripts side by side in your browser for free, with nothing uploaded. Unlike many online SQL compare tools that only diff text, it also compares SQLite .db files table-by-table (free up to 50MB and 200,000 rows per table) and supports MySQL and schema-focused pages. Paid plans cover larger .db files on our servers.

What's the best free online SQL diff checker for MySQL, PostgreSQL, and SQL Server?+

SQL Diff Tool works with any dialect (MySQL, PostgreSQL, SQL Server, SQLite). Paste the original into the left pane and the changed version into the right to see added, removed, and changed lines. Ignore whitespace and Ignore case options help when only formatting differs. Free for script and query diffs with nothing uploaded.

What is a free online SQL diff tool?+

A free online SQL diff tool lets you paste two SQL scripts or queries and see every added, removed and changed line side by side in the browser. SQL Diff Tool does that with a Myers diff, works with any dialect (MySQL, PostgreSQL, SQL Server, SQLite), needs no signup, and uploads nothing for text compares. It can also compare two SQLite .db files table by table (free up to 50MB and 200,000 rows per table; larger files need a paid account).

Stay updated

Occasional SQL tips and new tools. No spam, unsubscribe anytime.