Text Compare
Compare two versions of plain text, prose or source code in this browser. Paste the original and changed versions into the two boxes, review added, removed and changed lines, and see word highlights inside changed pairs. Choose side-by-side or a signed Unified view, with optional case and whitespace ignoring. Copy unified returns the complete comparison even when the screen draws only its first 600 rows.
Two empty boxes.
The original has 1 line and the changed text has 1. The two texts are identical under the options you chose, once line endings are normalised.
| # | Original | # | Changed |
|---|---|---|---|
| 1 | (blank line) | 1 | (blank line) |
Plain text only: paste the two versions in, or open a file in a text editor and copy it here. Case decides whether "Hello" and "hello" are the same line, and Whitespace decides whether spacing inside a line counts as a difference. Neither option changes the text shown, only what counts as equal. A line over 2,000 tokens is marked as changed as a whole rather than word by word.
Common questions
- How do I compare two text files online?
- Open each plain-text file in an editor, copy its contents and paste into Original and Changed. There is no file-import control. This browser workflow also works on a desktop with a current supported browser; it does not supply a Windows, macOS or Linux command or an installed editor.
- Can I compare text side by side or copy only the differences?
- Side by side shows paired lines and their numbers. Unified uses a space for unchanged lines, − for old lines and + for new lines; the copied text uses ASCII minus and plus. Both include unchanged rows. There is no only-differences filter or download button.
- Can I ignore whitespace or letter case?
- Whitespace Ignore collapses space/tab runs and trims each line for equality; it retains blank lines. Case Ignore uses default Unicode lowercasing. The original spelling and spaces stay visible. Both options combine and can be changed independently.
- Does it measure similarity or plagiarism?
- It shows exact matches and differences under the selected equality options. It does not compute a similarity percentage, assess meaning, detect plagiarism or judge originality. The same line can have multiple plausible alignments where content repeats.
- How does it treat line endings and blank lines?
- Line endings are normalized from CRLF, LF and CR to LF before comparison. Blank lines remain rows, including the empty row after a final newline, so adding a final newline can be a difference. It compares lines, then words inside changed pairs; it does not parse source-code meaning.
- Can I compare Word or PDF files, multiple sources or duplicate lists?
- For selectable PDF or Word text, manually copy it into the two boxes; this discards layout and formatting, which are not compared. There is no direct PDF/DOCX import, multi-document comparison, duplicate removal or common-line extraction. List Compare is a separate list-set job.
- How large a text can I compare?
- Each box accepts up to 20,000 lines after line-ending normalization and 2,000,000 UTF-16 code units. A very different pair requiring more than 1,200 line edits uses positional alignment and states that fallback. Long pairs run in a browser worker when available. Only the first 600 rows are drawn, up to 1,200 lines in Unified when every row changed, but Copy unified includes all rows. Drafts longer than 100,000 UTF-16 units are not remembered.
- Is the copied unified output an applicable patch?
- No. It is a signed text comparison without file headers or patch hunk coordinates. Treat it as a readable result, not input for git apply or another patch program.
- Is my text uploaded and are presets remembered?
- The comparison runs in this browser and drafts/settings stay on this device. A preset overrides only its named opening setting; editing source text does not overwrite remembered view or equality choices. Explicitly selecting a control saves that choice.
Line endings are normalised before comparing, so the same file saved on Windows and on a Mac does not read as changed on every line. Changed lines are compared again word by word. Where lines repeat, more than one alignment is correct, and this one pairs them the same way every time.