SQL Tools
Diff two SQL queries side by side — normalize formatting first to surface only real changes.
Original
Modified
Differences
Paste SQL into both panes to see the differences
About this tool
SQL Compare diffs two SQL queries and highlights exactly what changed — added, removed and modified lines — in a side-by-side or unified view. It's built for reviewing query edits, migrations and pull-request changes where you need to see the real difference, not noise.
Its defining feature is SQL-aware normalization: before diffing, both queries can be run through the SQL formatter, so two statements that differ only in spacing, line breaks or keyword casing are recognized as identical. Toggle normalization off to compare raw text exactly, and layer on 'ignore case' and 'ignore whitespace' to focus purely on structural changes.
Like the rest of the SQL toolkit, comparison happens entirely in your browser — nothing is uploaded. If one side isn't valid SQL for the chosen dialect, that side falls back to a raw-text comparison so you always get a useful result.
How to use
Paste both queries
Put the original query on the left and the modified one on the right (or load a sample pair).
Normalize to cut the noise
Keep 'Normalize' on so formatting-only differences disappear and only meaningful changes remain. Pick the dialect that matches your SQL.
Read the diff
Green marks additions, red marks removals; the +N / −N badges summarize the change. Switch between Side by side and Unified views.
Fine-tune the comparison
Use 'Ignore case' and 'Ignore whitespace' to further narrow the diff to structural changes.
Comparison options
| Option | Effect |
|---|---|
| Normalize (format both first) | Formatting-only differences are ignored — compares meaning, not layout |
| Ignore case | Treats differently-cased text as equal |
| Ignore whitespace | Ignores indentation and spacing changes |
| Side by side / Unified | Aligned two-column view, or a single combined column |
| Dialect | Used when normalizing so each side formats correctly |