Compare two texts and see exactly what changed
Paste the original on the left and the new version on the right, then press Find difference or Ctrl+Enter. Removed lines are shown in red, added lines in green, and lines that were edited are paired side by side with the changed words highlighted inside them, so a single corrected comma does not hide in a wall of red and green. A summary tells you how many lines were added, removed, changed and unchanged, plus an overall similarity percentage.
Comparison runs in your browser using the open-source jsdiff library, an implementation of the Myers difference algorithm that also powers many code-review tools. Your contracts, code, essays and configuration files are never uploaded, and the page works offline once loaded.
Features that save time
- Side-by-side or unified view. Side by side is easiest for prose and documents; unified is compact and familiar to developers who read Git diffs.
- Word or character highlighting inside changed lines. Use characters for IDs, numbers and code, words for sentences.
- Hide unchanged lines with three lines of context around each change. Large files with a few edits become a short list; click the gap bar to expand everything.
- Next / previous change buttons (Alt+↓ / Alt+↑) jump between change blocks.
- Ignore case and ignore leading and trailing spaces remove noise when text was re-typed or re-indented.
- Open or drop files on either side — .txt, .csv, .json, .xml, .md, source code and subtitles all work.
- Download a unified .patch file or copy it, ready for
git apply,patch -p0or a code review comment. - Hindi and every Unicode script are compared correctly, and the interface is available in Hindi.
How to read the result
Each row shows the line number in the original, the original text, the line number in the new version and the new text. A row with only a left side was deleted; a row with only a right side was inserted, and the empty side is hatched. When a line exists on both sides but differs, the removed part is struck through on the left and the inserted part is highlighted on the right. The similarity figure is the share of lines that are identical, which is a quick sense of how much was rewritten; for wording-level similarity between two essays, use our duplicate-content checker instead.
Common uses
Contracts, agreements and policies
Compare the draft you sent with the version that came back to make sure no clause was quietly changed. Paste the text from each PDF or Word file; formatting is ignored and only words are compared.
Code and configuration
Check what changed between two versions of a config file, an .env template, an SQL script or a function you copied from Stack Overflow. Format both sides with the same tool first — for example our JSON or XML formatter — so indentation does not appear as a change.
Essays, assignments and translations
Teachers can see what a student changed between drafts. Writers can review an editor's changes when tracked changes were lost. Translators can compare two revisions of the same Hindi or English text.
Lists and data exports
Compare two exports of a customer list, a price list or a stock report. If the order of rows differs between exports, sort both lists first with our duplicate line remover and sorter, otherwise every moved row appears as a removal and an insertion.
How the comparison algorithm works
A diff tool answers one question: what is the smallest set of deletions and insertions that turns the original into the new version? The Myers algorithm used here finds that shortest edit script line by line, which is why moved paragraphs show up as one deletion plus one insertion rather than as dozens of tiny edits. Once the changed lines are known, a second, finer comparison runs inside each pair of changed lines to find the exact words or characters that differ. This two-level approach is the same idea used by GitHub and GitLab pull-request views, and it keeps the result readable even when a long line has only one small typo fixed. Because both passes run locally, you can compare confidential material, such as salary sheets, legal notices or unreleased source code, without any risk of it leaving your computer.
Tips for accurate comparisons
- Line endings (Windows CRLF versus Unix LF) are normalised automatically, so they never show up as changes.
- If whole paragraphs appear as changed because the text was re-wrapped, put each sentence on its own line on both sides before comparing.
- For very large inputs with many differences, the algorithm stops after eight seconds instead of freezing the tab; compare the file in sections.
- Use History to reopen a previous comparison; pairs are stored only in your browser.
Tip: when comparing contracts or policy documents, run the comparison once in word mode to spot changed phrases and once in character mode to catch small edits such as a changed digit, comma or date. Download the .patch file to keep a permanent record of what changed between versions.
Frequently asked questions
Is my text uploaded to compare it?
No. The comparison runs in your browser with the open-source jsdiff library. Nothing is sent to a server.
Can I compare two files?
Yes. Use Open file or drop a file on either side. Any text-based file works: .txt, .csv, .json, .xml, .md, source code and subtitles.
Can it compare Word or PDF files directly?
Not directly. Copy the text out of each document and paste it in. Formatting such as bold or fonts is not compared, only the words.
Why does every line show as changed?
Usually the indentation or line wrapping differs. Tick Ignore leading/trailing spaces, or format both sides the same way first.
What does the similarity percentage mean?
It is the share of lines that are identical in both versions. It shows how much was rewritten at line level, not how similar the wording is.
Is there a size limit?
Inputs over 1 MB work. If the two texts are huge and very different, computing stops after eight seconds so the page never freezes.