How the comparison works
The tool uses the difference algorithm published by Eugene Myers in 1986, the same approach behind many version control and diff programs. It finds the smallest set of lines to delete and insert to turn the first text into the second, so unchanged lines line up even when a paragraph has been added in the middle. Where a removed line and an added line sit at the same spot, they are paired as a change and compared again word by word, so you see that "500 AED" became "650 AED" instead of a whole red line and a whole green line.
Line by line or word by word
Line by line suits anything where lines matter: code, CSV rows, configuration files, lists of names, subtitles and contracts with numbered clauses. Word by word suits essays, letters and articles where a sentence may have been re-wrapped across lines; it compares the whole text as one stream of words and shows deleted words struck through and new words underlined in place.
Ignoring case, spaces and tashkeel
Ignore case treats "Dubai" and "DUBAI" as the same. Ignore whitespace treats runs of spaces and tabs as one space and skips spaces at the start and end of a line, which helps with text copied from PDFs or re-indented code. Ignore Arabic diacritics compares "مُحَمَّد" and "محمد" as equal, useful when one copy of a text has tashkeel and the other does not. The highlighting still shows the text as you typed it.
Arabic and mixed-direction text
Each line is shown with its own direction, so an Arabic line reads right to left and an English line left to right in the same table. Words are split at spaces and punctuation, including the Arabic comma and question mark, and a word keeps its vowel marks, so a change of a single haraka is shown on the right word. On the Arabic version of this page the original text sits on the right and the changed text on the left, as an Arabic reader expects.
Saving the result and privacy
Download changes.diff to keep a record of a line comparison in the unified diff format that Git and most code tools read, with three lines of context around each change. A word comparison downloads as a text file with removals in [- -] and additions in {+ +}. The comparison runs entirely in your browser, which matters for contracts, HR letters and unpublished work: nothing is uploaded or stored.