⚖️ Compare · Highlight · Patch

Diff Checker

Compare two texts and highlight differences in side-by-side, unified or inline view. Powered by the Myers diff algorithm — the same one used by Git and GitHub.

Original (A)

Modified (B)

A serious diff tool that runs entirely in your browser

This page implements the same Myers diff algorithm that Git, GitHub, GitLab, VS Code and most "diff" tools use. It finds the shortest edit script — the smallest sequence of insertions and deletions to turn one text into the other. The result is a clean, intuitive comparison without spurious "everything changed" noise.

Three view modes

Three comparison granularities

Ignore options

Why Myers and not a simpler algorithm?

Naive longest-common-subsequence diff is O(N·M) in time and memory — fine for a few hundred lines but slow on real files. Myers' algorithm is O(N·D), where D is the size of the actual diff. For typical inputs (most lines unchanged), D is small and the algorithm runs in near-linear time. Our implementation handles 500-line diffs in milliseconds.

Privacy

Both texts are diffed entirely in your browser tab. We don't upload, we don't log, we don't analyze. No external library is loaded — the algorithm is ~120 lines of vanilla JavaScript embedded in the page.

Export

The Copy as unified patch button copies a diff -u-style patch to your clipboard, ready to paste into a GitHub comment, a Slack message, or to save as a .patch file.

Common use cases

Frequently Asked Questions

How does this diff checker compare texts?
It uses the Myers diff algorithm — the same one used by Git, GitHub, and VS Code. It finds the shortest edit script (minimum insertions and deletions) to turn one text into the other, producing a clean comparison without false positives.
Does this tool upload my text to a server?
No. Both texts are compared entirely in your browser tab using about 120 lines of vanilla JavaScript. Nothing is uploaded, logged, or analyzed externally. Close the tab and your data is gone.
What view modes and granularity options are available?
You can view diffs in side-by-side, unified (git-style), or inline mode. Comparison granularity can be set to lines, words, or characters. You can also ignore whitespace, case, or empty lines to focus on meaningful changes.
What are typical use cases for a diff checker?
Common uses include comparing config file versions, verifying legal contract revisions word-by-word, spotting single-character typos in API keys or URLs, seeing what changed between AI-generated drafts, and generating shareable patches without committing to Git.
Is this diff checker really free?
Yes, 100% free with no restrictions. There is no signup, no file-size limit, no usage cap, and no premium tier. You can compare texts as often as you need. The tool is ad-supported only.

Related Tools