Text Diff Checker
Original
Changed
Differences
ExampleAbout
Text diffing compares two text blocks and identifies the minimum set of additions and deletions needed to transform one into the other. This is the same technique used by version control systems like Git to track changes between file revisions.
How to use
1.
Paste the original text into the Original panel and the new version into the Changed panel - Swap exchanges them
2.
Switch on Ignore whitespace or Ignore case if those differences do not matter to you
3.
Read the Differences panel: added lines are green (+), removed lines red (-), changed words are highlighted, and the two number columns give each line's position in the Original and Changed text
Common uses
▸
Comparing two versions of a config file or script
▸
Reviewing edits in a document or code snippet
▸
Spotting unintended changes between two text blocks
Similar tools
Frequently asked questions
What algorithm does this use?
Line-level changes are detected using the jsdiff library's implementation of the Myers diff algorithm, the same approach used by Git and GNU diff. When a block of lines is modified (equal numbers of removed and added lines), a word-level diff is run within each line pair to show exactly which words - and which spacing - changed.
Does it show inline word-level differences?
Yes, when a block of changed lines has the same number of lines on both sides: each removed line is shown directly above its replacement, and the words that changed are picked out in white on a darker green or red. Changes in spacing or indentation are highlighted too, unless Ignore whitespace is on. Lines that were only added or removed, blocks where the line counts differ (one line edited and another inserted next to it, for example), and very long or heavily rewritten line pairs get the green or red line tint without word highlights.
Can I compare code files?
Paste any plain text including source code, configuration files, or prose. The tool compares line by line with word-level highlights for changed lines. Turn on Ignore whitespace to hide re-indented or re-spaced lines - all spaces and tabs are left out of the comparison, as with git diff -w - and Ignore case to treat upper and lower case as equal. A file that ends with a newline and one that does not are treated as having the same lines, so a missing final newline is not reported as a change.
Is my text sent to a server?
Comparison runs entirely in your browser. Neither text block is transmitted or stored anywhere.
Is there a size limit?
Each side is limited to 2,000 lines and 2,000,000 characters. Inputs over either limit show an error and the diff is not computed, to prevent the browser from freezing. Texts near the limit that share almost no lines may also stop with an error if the comparison takes too long.