Text Diff Checker
Compare two texts or files by line, word or character. Jump between changes, merge them, and export a .diff or HTML report.
Open or drop .txt, .md, .html, .docx, .pdf, .odt or .rtf files — they are read on your device, never uploaded.
Merged result
Starts as the modified text. For each change, click Use original or Use modified — in the change header (line mode) or with the buttons above for the selected change. You can also edit the result directly.
You edited the merged text, so new choices are not applied to it automatically. (replaces your edits).
Related Tools
How to Use
- Add Your Two Texts — Paste or type the original on the left and the changed version on the right. You can also click Open file (or drop a file onto a panel) to load a .txt, .md, .html, .docx, .pdf, .odt or .rtf file. Files are read on your device and never uploaded.
- Choose How to Compare — Pick Compare by Lines, Words or Characters, and a Side by side or Unified view. In line mode, changed lines also highlight the exact words or characters that changed. Tick Ignore case, whitespace, blank lines or punctuation-only changes if those differences do not matter, then click Compare Texts (or press Ctrl+Enter in either panel).
- Jump Between Changes — Use Next and Previous, or press Alt+Down and Alt+Up, to move from one change to the next. The counter shows which change you are on, and the stats bar shows how many lines, words or characters were added, removed and left unchanged, plus a similarity score.
- Merge and Export — For each change, choose Use original or Use modified. The Merged result box updates as you go, and you can edit it, copy it or download it. Copy diff, Download .diff and HTML report save the comparison itself.
About the Text Diff Checker
The Text Diff Checker shows exactly what changed between two versions of a text: what was added, what was removed and what stayed the same. Writers use it to see what an editor touched, teams use it to check two drafts of a contract or policy, and developers use it to turn two versions of a file into a patch. Beyond the comparison itself, it lets you jump from change to change, accept or reject each change into a merged copy, and save the result as a .diff file or a self-contained HTML report.
How the comparison works
Both texts are split into items, then compared with the Myers O(ND) difference algorithm (the default diff algorithm in Git), which finds the smallest set of additions and deletions that turns the original into the modified text. What counts as an item depends on the mode:
- Lines: each line is one item. When a changed line can be paired with its new version, the words (or characters) that changed inside it are highlighted too.
- Words: each word is an item, and so is each punctuation mark. Spaces are compared but never counted as words.
- Characters: each character is an item; an emoji or an accented letter counts as one.
The stats bar counts added, removed and unchanged items and gives a similarity score: unchanged items ÷ (unchanged + added + removed). It shows 100% only when there are no differences; any difference caps it at 99.9%.
Worked example: one edit, three modes
Original, three lines: The meeting starts at 3 pm on Tuesday. / Please bring the Q3 report. / We will review the budget.
Modified: “3 pm” becomes “2 pm,” and the second line becomes Please bring the Q3 report and your notes.
| Mode | Removed | Added | Unchanged | Changes | Similarity |
|---|---|---|---|---|---|
| Lines | 2 lines | 2 lines | 1 line | 1 | 20% |
| Words | 1 word | 4 words | 20 words | 2 | 80% |
| Characters | 1 character | 16 characters | 92 characters | 2 | 84.4% |
In line mode the two edited lines sit next to each other, so they form a single change of two lines out and two lines in. Word mode isolates the two real edits: 3 replaced by 2 (1 word removed, 1 added) and and your notes inserted before the period (3 more words added). The unchanged count of 20 includes the three periods, because punctuation marks count as items. The same edit can look minor or major depending on the mode, so only compare similarity scores taken in the same mode.
Limitations
- Moved text is not detected as a move. A paragraph moved to a new position appears as a removal in one place and an addition in another.
- Line mode is sensitive to line wrapping. If one version was re-wrapped, nearly every line differs. Use word mode for prose that may have been reflowed.
- Formatting is not compared. Word, PDF, OpenDocument and RTF files are converted to plain text first, so bold, fonts and layout changes are invisible. Scanned PDFs without a text layer have nothing to compare.
- Very large, very different inputs are simplified. If a comparison would run longer than about two seconds, the remaining changed regions are shown as whole blocks removed and added, with a note.
- In-line highlights are skipped for a pair of lines that has little in common (under about 30% shared, non-space text) or is extremely long; the whole line is still marked as changed.
Practical tips
- Turn on Ignore whitespace when one version came from a PDF or an email, where spacing and indentation often shift without anyone editing the words.
- Use Ignore case together with Ignore punctuation-only changes to focus on wording. With both on, “Hello, world.” and “hello world” compare as identical.
- Keep the HTML report when you need a record of what changed between two versions of an agreement: it lists the counts, the mode and the ignore options that were used.
- To check how much two different documents overlap, rather than how one version became another, use the Text Similarity & Plagiarism Checker, which finds shared phrases even when they appear in a different order.
- For tracking your own drafts over time, see Version Control for Writers.
Privacy: the comparison, file conversion, merge and exports all run in your browser, so neither text is uploaded.
Frequently Asked Questions
What is the difference between line, word and character mode?
Line mode compares whole lines, which suits code, lists and structured documents. Changed lines are paired up, and the words (or characters) that changed inside each pair are highlighted, so you do not have to hunt for a single edited word in a long line. Word mode compares words and punctuation marks in a flowing text, which suits prose. Character mode compares individual characters, which is useful for spotting typos, swapped letters, changed digits or extra spaces. Emoji and accented letters count as single characters.
What are the side-by-side and unified views?
Side by side shows the original on the left and the modified text on the right, with changed lines on the same row and both sides in one scrolling view so rows always line up. Unified shows one column, like a code review: removed lines marked with a minus sign and added lines with a plus sign, each with its old and new line number. In word and character mode, unified shows a single flowing text with removed parts struck through and added parts highlighted.
How do I merge the two versions?
Each change has Use original and Use modified buttons (in line mode they sit in the change header; in every mode the buttons next to Next and Previous act on the selected change). The Merged result box starts as the modified text and updates as you choose. Use original for all and Use modified for all set every change at once. You can edit the merged text directly, then copy or download it. If you edit it by hand, later choices do not overwrite your edits unless you click Rebuild from choices.
Which files can I open, and are they uploaded?
You can open or drop .txt, .md, .html, .docx, .pdf, .odt and .rtf files (up to 25 MB). Text, Markdown and HTML files are compared as they are, including HTML tags. Word, PDF, OpenDocument and RTF files are converted to plain text first, so formatting such as bold or fonts is not compared. Scanned PDFs that contain only images have no text to compare. Nothing is uploaded: the files are read by your browser on your device.
What do the ignore options do?
Ignore case treats uppercase and lowercase letters as the same. Ignore whitespace treats differences in spaces, tabs and indentation as unchanged. Ignore blank lines (line mode) skips changes that only add or remove empty lines, and shows blank lines inside other changes in grey. Ignore punctuation-only changes skips changes where only punctuation differs, such as an added comma or a removed apostrophe. Ignored differences are not counted in the stats and are not shown as changes.
What is in the .diff export and the HTML report?
Download .diff saves a standard unified diff (the format used by git diff and diff -u) with three lines of context, so it can be applied with git apply or patch -p1. Copy diff copies the same text in line mode, and [-removed-] {+added+} markup in word and character mode. HTML report saves a single self-contained web page of the comparison as you see it, with the stats and the options used. It contains no scripts and opens in any browser, so it is easy to email or archive.
What algorithm does the diff use?
The tool uses the Myers O(ND) difference algorithm, the default algorithm in Git and the basis of GNU diff. It finds the shortest set of additions and deletions that turns the original into the modified text, which is the same as finding their longest common subsequence. The linear-memory variant is used, so long documents do not exhaust browser memory. If two very large and very different texts would take more than about two seconds to compare, the remaining changed regions are shown as whole blocks removed and added, and a note tells you so.
What does the similarity percentage mean?
Similarity is unchanged items divided by all compared items (unchanged + added + removed), where items are lines, words or characters depending on the mode. Whitespace is never counted as a word. 100% means no differences were found; texts with any difference show at most 99.9%.
Are there keyboard shortcuts?
Yes. Alt+Down jumps to the next change and Alt+Up to the previous one (when the cursor is not inside a text box). Ctrl+Enter (Cmd+Enter on a Mac) in either text panel runs the comparison.
Is my text sent to a server?
No. The comparison, file reading, merging and exports all run in your browser using JavaScript. Your texts and files are never transmitted to any server, which makes the tool safe for confidential documents, contracts, proprietary code and private drafts.