How to compare two texts
- Paste the original version on the left and the changed version on the right.
- Press Compare. After the first comparison, the result updates as you edit either box.
- Read the result: lines marked − were removed from the original, and lines marked+ were added in the changed text. Unmarked lines are the same in both.
- Switch between the Unified view (one column, like
git diff) and Side by side.
Options
- Ignore case treats “Hello” and “hello” as the same line.
- Ignore whitespace ignores spaces and tabs at the start and end of lines, and treats runs of spaces as a single space. Useful when indentation has changed.
- Hide unchanged lines shows three lines of context around each change and collapses the rest, so you can find changes quickly in long documents.
How the comparison works
The tool uses the Myers difference algorithm, the same approach used by Git and many other diff tools. It finds the smallest set of line additions and removals that turns the original into the changed text.
Line endings are normalised, and a single newline at the very end of the text is ignored, so"one\ntwo" and "one\ntwo\n" compare as identical. Blank lines elsewhere are compared like any other line.
Limitations
- Each side can have up to 20,000 lines.
- Changes are shown per line, not per word or character. A small edit marks the whole line as changed.
- Where long sections of the two texts are almost completely different, the tool shows each such section as one removed block and one added block rather than searching for a minimal diff, to keep your browser responsive.
Frequently asked questions
Why is a changed line shown as one removal and one addition?
This tool compares whole lines. If any character on a line changes, the old line is marked as removed and the new version as added. In the side-by-side view, the two versions appear next to each other so the change is easy to spot.
Can I compare code or files?
Yes. Paste the contents of each file into the boxes. Line endings are normalised, so a file saved on Windows (CRLF) and the same file saved on macOS or Linux (LF) compare as identical. Use Ignore whitespace to skip indentation-only changes.
Is my text uploaded?
No. The comparison runs entirely in your browser, so it is safe to compare private documents, configuration files or code.
