About this diff checker
A diff shows what changed between two versions of the same text: a contract before and after edits, two drafts of an article, an old and a new configuration file, or code before a refactor. This checker lines up the two texts line by line, colors added lines green, removed lines red, and changed lines yellow, and inside a changed line marks the exact characters that differ. Switch between a side-by-side view and a unified view like Git uses, jump from change to change, and ignore differences in spacing or capitals when they do not matter.
How to compare two texts
- Paste both versions. Paste the original on the left and the modified text on the right, or press an example. Swap exchanges them.
- Choose what to ignore. Tick Ignore whitespace, Ignore case, or Trim lines if those differences do not matter.
- Press Compare texts. The differences appear below with counts and a similarity score.
- Review the changes. Switch between side by side and unified, and use the previous and next buttons to move between changes.
Frequently asked questions
How is a changed line different from a removed and an added line?
When lines are removed and new lines are added at the same place, they are paired up and shown as changed lines, with the differing characters marked. Extra lines on either side are shown as plainly added or removed.
What do the ignore options change?
They only affect which lines count as equal. Ignore whitespace ignores all spaces and tabs, Trim lines ignores spaces at the start and end, and Ignore case ignores capitals. The texts are always shown exactly as you pasted them.
How is the similarity score calculated?
It is the share of lines the two texts have in common: twice the number of unchanged lines divided by the total number of lines in both texts. Identical texts score 100%.
Is there a size limit?
The comparison runs in your browser and works well up to a few thousand lines per side. Very large files are refused with a message rather than freezing the page.
Can I copy the result?
Yes. Copy unified diff copies the comparison with - before removed lines and + before added lines, similar to the output of git diff.