📝 Text & List

Diff Checker (Text Compare)

Compare two texts side-by-side. Highlights additions, deletions and changes line-by-line. Free.

Diff Checker

How to use the Diff Checker

1

How line diff works

The tool splits both texts into lines, then uses the longest-common-subsequence (LCS) algorithm to find the optimal alignment. Lines that exist only in the original are marked deleted. Lines only in the changed version are added. Lines in both with matching content are unchanged.

2

When to use diff

Compare two versions of a document, contract or code file. Spot what changed between revisions. Programmers use diff to review code changes before merging. Writers use it to track edits between drafts. The output here is the same line-by-line view that Git, GitHub and most editors show.

Frequently asked questions

What is the difference between line, word and character diff?

Line diff highlights whole lines that were added or removed, word diff compares word by word and character diff compares every character. Use line diff for code and documents and character diff to spot tiny typos.

How does the diff work?

The tool computes the longest common subsequence of the two texts and marks everything outside it as added or removed. Green shows additions and red shows deletions.

Can I compare files with this tool?

Paste the contents of each file into the two boxes. Nothing is uploaded, so confidential text stays in your browser.