Text Diff
Highlight changes between texts
Comparison
3 line(s) changed Hello,
โ The meeting is at 3 PM.
+ The meeting has moved to 4 PM.
Location is the 2nd floor room.
+ Please make sure to attend.
Thanks.
Do this with a friend
Watch the same screen together, live
Was this tool helpful?
About this tool
Text Diff takes what you paste into the left "Original" box and the right "Modified" box and, using the longest common subsequence (LCS) algorithm, lines them up and shows only the lines that differ. For instance, in the sample text loaded by default, when the original line "The meeting is at 3 PM." becomes "The meeting has moved to 4 PM." in the modified version, that line shows up as a matched pair โ a red strikethrough for the original and a green background for the modified one โ while an unchanged line like "Location is the 2nd floor room." stays uncolored, and a brand-new line such as "Please make sure to attend." gets only a green background.
How to use
- Paste the original text into the left "Original" box and the edited version into the right "Modified" box. Sample text is already loaded when the tool opens, so you can see a result immediately.
- The line-by-line comparison recalculates and appears below as soon as you type.
- Red strikethrough lines (โ) existed only in the original; green background lines (+) exist only in the modified version.
- Uncolored lines are identical in both texts and give you the surrounding context for a change.
- The number of changed lines is summarized at the top for a quick sense of scale.
- Press "๐ฅ Play together" to invite someone by link and view the same comparison live.
Frequently asked questions
- Does it compare line by line or character by character?
- Line by line. If even one word changes within a line, the whole line shows up as a removed (โ) and added (+) pair. It does not point out exactly which characters within a line changed.
- What happens if a line just moves to a different position?
- Because it uses the longest common subsequence (LCS) method, a line that moved shows up as removed from its old spot and added at its new spot. When several lines are identical, which pair gets matched depends on the algorithm.
- Does a single extra space count as a change?
- Yes. A trailing space or a one-character indentation difference is treated as a different line and shown as a change.
- Is the text I paste in sent to a server?
- No. Comparison happens entirely in your browser and neither text is sent anywhere.
- Are blank lines compared too?
- Yes. Every line produced by splitting on newlines is compared, so a blank line counts as a line too. If a blank line in the original disappears in the modified version, it shows up as removed.
- Is it case-sensitive?
- Yes. A difference in uppercase versus lowercase makes two lines count as different, even if they look like the same word โ "Hello" and "hello" would be shown as different lines.
- Can it handle very long documents?
- It can, but the LCS calculation scales with the number of lines in each text multiplied together, so comparing an entire document of several thousand lines at once can take a moment to finish. Comparing by paragraph or file tends to be faster.
- Can someone I invite edit the comparison with me live?
- Yes. Once you create a room and send the link, whatever anyone types into the Original or Modified box is reflected on everyone else's screen too.
- Can I diff code or config files?
- Yes. It is a plain line-by-line comparison with no language awareness, so it works on code, config files, lists, or any text organized into lines.