Skip to content
Free tool · Data & formats

Text Diff Checker

Compare two versions of a text, config file or source code and see exactly what changed: added, removed and changed lines, with the changed words highlighted inside each line. Switch between side-by-side and unified views, ignore whitespace or case, and copy the result as a patch.

Runs in your browser — nothing is uploadedNo sign-up · no tracking of your input

Original

Changed

Paste two versions to compare them. The comparison runs in this browser; nothing is uploaded.

How to use the Text Diff Checker

  1. 1

    Paste both versions

    Paste the original on the left and the changed version on the right. Use Swap to reverse the direction or Example to try it out.

  2. 2

    Read the differences

    Changed lines appear side by side with the exact words highlighted. Unchanged stretches fold away; open them when you need the context.

  3. 3

    Adjust and export

    Ignore whitespace, case or blank lines to hide noise, switch to the unified view, and copy the result as a unified diff patch.

FAQ

Text Diff Checker: frequently asked questions

How does the diff algorithm work?

It uses Myers' O(ND) difference algorithm, the same one git uses by default. It finds the smallest number of added and removed lines that turn the original into the changed text, then compares the words inside each changed line to highlight what exactly differs.

What is a unified diff?

The standard text format for changes, used by git diff, code reviews and the patch command. Lines starting with - were removed, lines with + were added, and @@ -10,4 +10,5 @@ headers give the line numbers. Each hunk carries three unchanged lines of context so the patch can be applied reliably.

What do the ignore options do?

Ignore whitespace treats lines as equal when they differ only in spaces, tabs or indentation width. Ignore case compares letters case-insensitively. Ignore blank lines leaves empty lines out of the comparison. They hide formatting noise, for example after reformatting code.

Is there a size limit?

Each side can have up to 20,000 lines, compared instantly in the browser. If two large texts differ in more than about 2,000 lines, the differing middle part is shown as one block of removals and additions so the page stays fast.

Is my text uploaded anywhere?

No. Both texts are compared by JavaScript in your browser and never leave your device, so you can safely compare configuration files, contracts or code that contains secrets.