Text Diff / Compare

Paste two texts to compare them online and find every difference. Review added, removed and modified lines in a side-by-side or inline diff, highlight changes by word or character, and check the similarity score — privately in your browser.

Try:
Original 0 lines
Changed 0 lines
Result

Enter text in both panels to compare

✓ Client-side comparison, nothing uploaded ✓ Line, word and character highlighting ✓ Instant, real-time results ✓ Client-side processing only
Examples
Paragraph edit
Original
The quick brown fox jumps over the lazy dog.
This sentence stays exactly the same.
This line will be deleted.
Changed
The quick brown cat jumps over the lazy dog.
This sentence stays exactly the same.

One word changed and a whole line removed — watch the word-level highlighting.

Code change
Original
function sum(a, b) {
  return a + b
}
Changed
function sum(a, b, c) {
  return a + b + c
}

A new parameter added to a function — compare by character to spot each edit.

Version bump
Original
react: 18.2.0
vite: 5.0.0
typescript: 5.3.3
Changed
react: 18.3.1
vite: 6.4.3
typescript: 5.3.3
zod: 3.23.8

Compare dependency versions line by line, including a newly added one.

Reordered list
Original
alpha
beta
gamma
delta
Changed
delta
alpha
gamma
beta

Enable Sort lines to compare the same list without treating its reordered entries as changes.

How to compare two texts online

Paste the original text into the left panel and the revised text into the right panel. The text-to-text comparison updates automatically as you type, so there is no upload or submit step. Added lines appear in green, removed lines in red, and paired edits are marked as modified.

  1. Enter or paste both versions of the text.
  2. Choose word, character, or line highlighting.
  3. Select a side-by-side or inline diff view.
  4. Review the changes, use the previous and next controls to move between them, or copy the result as a unified diff.

You can swap the original and changed versions at any time. Long runs of unchanged lines are collapsed to keep the differences easy to scan, while Only changes hides all unchanged context.

Read lines, words, characters, and similarity

This online diff checker first aligns both inputs line by line with the Myers difference algorithm. A line found only in the revised text is counted as added, a line found only in the original is counted as removed, and corresponding deleted and inserted lines are presented as one modification.

By word highlights changed words and punctuation inside a modified line, which is useful for articles, contracts, and edited paragraphs. By character pinpoints individual letters, digits, spaces, or symbols in short strings and code. By line keeps the comparison at whole-line level.

The status bar reports added, removed, and modified line counts together with a similarity percentage. For ordinary inputs, similarity is calculated from the longest common subsequence of characters; very large inputs use a faster line-based approximation. Similarity describes shared content, not originality or plagiarism.

Control what counts as a text difference

Use the comparison options to remove noise before reviewing meaningful edits:

  • Ignore case treats uppercase and lowercase letters as equal.
  • Ignore whitespace removes whitespace when lines are matched.
  • Trim lines ignores whitespace only at the beginning and end of each line.
  • Ignore empty lines excludes blank lines from the comparison.
  • Sort lines compares sorted line sets, which helps with lists where order is not important.
  • Only changes hides unchanged lines in the rendered result.

Your selected options are saved in local browser storage for the next visit. The original input remains unchanged, and the copied unified diff reflects the currently prepared line comparison.

Compare strings, documents, text files, and code

The tool can compare plain-text content from notes, Notepad files, drafts, configuration files, data lists, and source code. To compare two text files or documents, open them and paste their text into the two panels; direct file upload and document-format parsing are not provided.

For a short string diff, choose character highlighting to catch a changed digit, punctuation mark, identifier, or URL. For prose, word highlighting makes revisions easier to read. For logs, inventories, or line-oriented configuration, line mode and Sort lines can be more useful.

Code is compared as plain text. This makes the service useful for quick code changes, but it is not syntax-aware and does not inspect repositories, commits, formatting rules, or programming-language structure.

FAQ

No. The comparison runs locally in your browser with JavaScript, and the text is not sent to the application server. This makes the tool suitable for private notes, drafts, code, and configuration text, subject to the normal security of your device and browser.

All three modes align the inputs line by line. Word highlighting marks changed words and punctuation inside a modified line, making it a good choice for prose. Character highlighting pinpoints individual letters, digits, spaces, or symbols in strings and code. Line highlighting skips intra-line analysis and treats the whole edited line as changed.

For ordinary inputs, similarity is based on the longest common subsequence of characters and is calculated as 2 × common length ÷ combined length. Very large inputs use a faster line-based approximation. A result of 100% means the compared content is identical under the active case option. This is a similarity indicator, not an originality or plagiarism score.

Yes, you can compare their plain-text content: open each file and paste one version into each panel. The service does not currently upload files or extract text from formatted Word or PDF documents, so formatting, images, and document metadata are not compared.

Yes, for a quick plain-text code diff. Character mode can expose small symbol changes, while line or word mode works well for larger edits. The comparison is not syntax-aware and does not understand programming languages, repositories, branches, or commits.

Ignore whitespace removes whitespace when deciding whether two lines match. Trim lines removes whitespace only from the beginning and end of each line. Neither option rewrites the text shown in the input panels; it changes how lines are matched for the diff.

Yes. Enable Sort lines to sort both inputs before comparison. This is useful for inventories, keyword lists, or configuration entries where order is irrelevant. Do not enable it when sequence or original line positions matter.

The button copies a plain-text unified-style result. Unchanged lines begin with two spaces, removed lines with a minus sign, and added lines with a plus sign. A modified line is copied as its old and new versions. It does not create or download a patch file.

There is no server upload limit because processing happens in the browser. Practical speed and capacity depend on the input size, the number of differences, your browser, and your device. Very large comparisons may take longer, and their similarity percentage uses a line-based approximation.
Related tools

Frequency Analysis

Analyze text frequencies and compare them with known language patterns for cryptanalysis.

Caesar Brute Force

Caesar cipher solver that tries every shift and highlights the most likely plaintext.

Letter Frequency

Online letter frequency analyzer with heatmap, letter counts, and language comparison.

Affine Cipher Solver

Affine cipher solver that tries all valid key pairs and ranks likely plaintext.

Vigenère Cracker

Automatic Vigenère cipher cracker with key recovery and ranked decryptions.