HandyFile

Compare two texts

Line-by-line differences between two blocks of text, computed in your browser.

About Diff checker

Paste two versions of something into the two boxes and this shows what changed between them, line by line. Removed lines are marked with `-`, added lines with `+`, and unchanged lines carry a leading space — the same convention `git diff` and `patch` use, so the output is familiar and pastes cleanly into a review comment.

The comparison uses a longest-common-subsequence algorithm, which is the same general approach version control uses. In practice that means it finds the smallest sensible set of changes rather than declaring everything different the moment one line is inserted near the top. Insert a line at the beginning of a thousand-line file and you will see one addition, not a thousand modifications.

Ignore trailing whitespace is on by default, because trailing spaces are invisible and are responsible for a large share of confusing "these look identical but the diff says otherwise" moments. Editors strip them inconsistently and some tools add them on save. Turn it off when whitespace is genuinely significant — in Markdown, where two trailing spaces force a line break, or in tests asserting on exact output.

Ignore case treats upper and lower case as equivalent. Useful for comparing configuration keys or SQL where casing is stylistic rather than meaningful.

Limits. Each side is capped at 5,000 lines. The algorithm needs time and memory proportional to the product of the two lengths, so an uncapped comparison of two large files would freeze the tab and then run out of memory. For anything larger, `git diff` or `diff -u` locally is both faster and better suited. The cap is a deliberate honest boundary rather than a limitation we hope you do not hit.

Both sides stay on your machine. Configuration files, environment variables and API responses are exactly the sort of thing people compare, and exactly the sort of thing that should not be pasted into a server you do not control.

Questions

Are my two texts uploaded?

No. The comparison runs entirely in your browser and neither side is transmitted. Config files and API responses are common inputs here, so that matters.

It says the texts differ but they look the same.

Almost always trailing whitespace or line endings. Trailing whitespace is ignored by default; if you turned that off, turn it back on. Windows and Unix line endings are normalised automatically.

Why is there a 5,000 line limit?

The algorithm needs memory proportional to the product of both lengths, so large inputs would freeze the tab. For bigger comparisons, git diff or diff -u locally is faster anyway.

Does it show word-level changes within a line?

Not currently — a changed line appears as one removal plus one addition. Line-level output matches the git diff convention and pastes cleanly into reviews.