Paste two texts and see what changed. Runs on your device.
The tool splits each text into lines and finds the longest sequence of lines that appear in both texts in the same order, not necessarily next to each other. Those lines are unchanged. Every other line in the first text is shown as removed, and every other line in the second text as added. This is the longest common subsequence method that diff programs have used for decades, so the result is the shortest list of changes that turns the first text into the second. Inside a block of changes, the first removed line is compared with the first added line, the second with the second, and so on, word by word and marks only the words that differ, so a change from quick to slow inside one sentence is easy to spot. A final line break, and the difference between Windows and Unix line endings, never count as changes. Lines are matched as typed, so café and cafe are different words and the whole word is marked.
Ignore case treats Hello and hello as the same line, and also compares words without regard to case inside a changed pair. It lowercases text the simple way, so Straße and STRASSE stay different. Ignore leading and trailing spaces trims each line before comparing, which helps when a file was re-indented or a line gained a trailing space. Ignore blank lines drops lines that contain only white space, both from the comparison and from the view and the counts. The other lines keep their original line numbers, so line 3 is still line 3 even when two blank lines above it are hidden. The text shown is always the text you typed. The options only change how lines are matched.
Every changed line starts with a marker: a plus sign for a line that was added, and a minus sign for a line that was removed. Unchanged lines have a blank marker. A screen reader hears the words Added, Removed or Unchanged before each line. Inside a changed pair, added words are underlined and removed words are struck through, so the change is visible without relying on colour. The first number on a row is the line number in the original text and the second is the line number in the changed text. Unified view lists everything in one column. Side by side puts the original on the left and the changed text on the right, and stacks them on narrow screens. Copy diff gives the unified text, one line per row, starting with a space, a plus sign or a minus sign.
Each box takes up to 1,000,000 characters. The tool first strips the lines that match at the start and at the end, which is fast even for 50,000 identical lines. Only the lines between them need the full comparison, and that work grows with the product of the two line counts. It is limited to 4,000,000 line pairs, for example 2,000 lines against 2,000 lines. Beyond that the texts are too large to line up, so the lines between the matching start and end are shown as removed and then added, with a note saying so. Comparing smaller parts shows the changes inside them. Small changes update as you type. When the comparison is bigger than 250,000 line pairs it waits 250 milliseconds after you stop typing. The view draws the first 2,000 rows, and Copy diff always contains all of them. Everything runs in this tab. Nothing is uploaded or stored.
The tool matches lines in order and does not detect moves. When a 3-line paragraph moves, the comparison keeps whichever side lines up longest, so either that paragraph or the lines it jumped over appear as removed in one place and added in another. Word-level marking applies only inside a block of changes, where the first removed line is compared with the first added one, and so on.
Yes. Windows (CRLF), old Mac (CR) and Unix (LF) line endings are all read as one line break, and a final line break at the end of a text is ignored. A file saved with CRLF compares equal to the same file saved with LF.
No. The comparison runs in your browser, in this tab, and neither text is sent anywhere, put in the page address or saved. Close the tab and both texts are gone. Only your choices, the three ignore options and the view, are remembered on this device. The page counts visits with Google Analytics, never the text.
Each box takes up to 1,000,000 characters. The lines between the matching start and end are lined up when their line counts multiply to at most 4,000,000, for example 2,000 lines against 2,000 lines. Above that the tool shows them as removed, then added, and suggests comparing smaller parts.
Every row of the comparison as plain text, one line per row. Added lines start with a plus sign, removed lines with a minus sign, and unchanged lines with a space. There are no headers or line numbers. It contains all rows even when the view shows only the first 2,000.
Ignore blank lines removes lines that hold only spaces or tabs from the comparison, the view and the counts. The remaining lines keep their original numbers, so if lines 1 and 2 are blank the first visible line is numbered 3. Turn the option off to see every line again.