Text Diff

Compare two texts line by line

Loading...

About this tool

The diff tool compares two texts and shows the differences line by line: added lines appear in green and removed lines in red. It's useful for reviewing code changes, comparing config versions and checking logs or documents.

The comparison uses the Longest Common Subsequence (LCS) algorithm, the same principle behind version-control tools. Everything is processed in the browser, with nothing sent elsewhere.

How to use

  1. Paste the original text in the left field.
  2. Paste the modified text in the right field.
  3. The result appears below, with a summary of how many lines were added and removed.
  4. Use Share to generate a link with both texts pre-filled.

Frequently asked questions

Is the comparison line-based or character-based?

Line-based. Each line is classified as equal, added or removed.

Can I compare large texts?

Yes, but very large texts may take longer, since the cost grows with the size of both sides.

Are the texts saved?

They're kept only in your browser, so you don't lose your work when reloading the page.

Advertisement