Online
- Open the Diff Checker.
- Paste the original on the left and the new version on the right.
- Choose to compare by lines, words or characters. Added text is green and removed text is red.
Tick Ignore whitespace to hide changes that are only spacing or indentation, and Ignore case to treat "Hello" and "hello" as the same.
In Visual Studio Code
Select both files in the Explorer, right-click and choose Compare Selected. From a terminal: code --diff old.txt new.txt.
On the command line
- Mac and Linux:
diff old.txt new.txt, ordiff -u old.txt new.txtfor the familiar +/− format. - Windows:
fc old.txt new.txtin Command Prompt.
Comparing lists
If the order of the lines does not matter, sort both lists first with Sort Lines, so the comparison shows only the entries that are really different.