Skip to content
MagicWebBox
Sign in

Text diff

Compare two versions of a text or a file, line by line

Differences

Paste two texts, then click “Compare”.

About this tool

The text diff tool shows the differences between two versions of some content: an edited config file, two API responses, a code snippet or a revised document. Paste the original and the new version, then run the comparison: added lines show up in green with a plus sign, removed lines in red with a minus sign, much like a git diff.

Each line keeps its number in both the old and the new version, and a summary counts added, removed and unchanged lines. Two options make the comparison more forgiving: ignore case, or ignore leading and trailing whitespace along with repeated spaces. The comparison handles up to 3,000 lines on each side and runs entirely in your browser.

How to use it

  1. Paste the first text into “Original”.
  2. Paste the second one into “New version”.
  3. Check “Ignore whitespace” or “Ignore case” if needed.
  4. Click “Compare”; use “Swap” to switch the two versions.

Frequently asked questions

Does the tool highlight changed words within a line?

No, the comparison works line by line: a modified line shows up as one removed line and one added line, usually next to each other. To spot the exact change, compare those two neighboring lines in the result.

What does “Ignore whitespace” do?

It trims spaces at the start and end of each line and collapses any run of spaces or tabs into a single space before comparing. Indentation changes are no longer flagged, but two words stuck together still differ from two separated words.

Is there a size limit?

Yes, each text can have at most 3,000 lines. Beyond that, the tool shows a message instead of a result, because the longest common subsequence algorithm it uses needs work proportional to the product of both line counts.

Are my texts sent to a server?

No. The diff is computed by your browser, with no network request, and the texts you paste are not saved. Only the whitespace and case options are remembered locally for your next visit.