Comparer

String Diff

Visually compare two strings or documents and see changes instantly.

View Mode

Input Character Count: 0

Input Character Count: 0

Enter text in the text editors above to see the diff.

Text Diff & Compare Tool

Paste two versions of a text and see what changed, line by line and side by side. Removed lines are highlighted in the Original Text column and added lines in the Modified Text column, with line numbers on both sides. A Merge view lets you decide, change by change, which version to keep and builds the merged text for you.

How to use

  1. Paste the original text into the left box.
  2. Paste the version you want to compare into the right box.
  3. Read the Diff View: removed lines are highlighted on the left, added lines on the right, and unchanged lines appear on both sides with their line numbers.
  4. To combine the two, switch View Mode to Merge. For each conflict, choose Use Original Text, Use Modified Text or Use Both.
  5. When every conflict is resolved, press Execute Merge. The merged text replaces the right-hand text and the view returns to Diff View so you can check it.

Frequently asked questions

How are differences found?
Line by line, with the jsdiff library. A line that was edited appears as one removed line and one added line; changes inside a line are not highlighted character by character.
Do spaces and indentation count?
Yes. Lines are compared exactly, so a changed indent or an extra space at the end of a line is shown as a change.
How does Merge work?
Wherever lines were replaced, Merge shows a conflict. Use Original Text keeps the left lines, Use Modified Text keeps the right lines, and Use Both keeps the left lines followed by the right lines. Lines that were only added are kept, lines that were only removed are dropped, and Execute Merge appears once every conflict has a choice.
Can I compare files?
There is no file picker. Open each file in an editor and paste its contents into the boxes.
Can I compare long documents?
Yes. There is no fixed limit; the diff is calculated in your browser, so very long texts simply take longer to show.
What is it useful for?
Checking what changed between two drafts of a contract or article, comparing config files from two servers, reviewing a colleague's edits, and confirming that a find-and-replace changed only what you meant.
Is my text kept private?
Yes. The comparison runs in your browser and nothing is sent to a server. Both texts and the view mode are also kept in the page URL when they are short enough, so you can reload or bookmark the comparison.