Skip to content
QuickKit 100% free · no login

Home › Text Tools › Text Diff Checker

Text Diff Checker (Compare Two Texts)

Runs in your browserFree · no sign-up

Paste the original on the left and the changed version on the right. Additions are green, deletions are red and struck through.

Differences

Advertisement

What a diff shows

A diff lists the changes needed to turn one text into another. It underlies version control systems such as Git, code reviews and the "track changes" view in word processors. Using this checker you can compare two drafts of an essay, two versions of a contract clause, two configuration files or the output of two program runs, and see at once what was added and what was removed instead of reading both line by line.

The algorithm

The tool finds the longest common subsequence (LCS) of the two texts, which is the largest set of pieces appearing in the same order in both. Everything in the first text that is not part of that sequence is shown as a deletion, and everything in the second text that is not part of it is an addition. Before the main step the tool strips the shared start and end of the two texts, which speeds up the common case of a small edit in the middle of a long document.

Choosing a comparison level

  • Lines: best for code, logs and lists. A line that was edited appears as one removed line and one added line.
  • Words: best for prose. Only the changed words are marked, so a rewritten sentence is easy to scan.
  • Characters: best for spotting small typos, differing identifiers or changes in numbers.

"Ignore case" treats upper and lower case letters as equal. "Ignore extra whitespace" collapses runs of spaces and tabs and trims each line before comparing, which is helpful when text was re-indented or re-wrapped.

Limits

The comparison is quadratic in the number of units compared, so there is a safety limit. Very long texts compared by character or word may be refused with a message; switch to line mode for large files. Line mode treats the exact characters of a line as the unit, so a single changed character causes the whole line to be marked, which is the standard behaviour of line diffs. The result is generated entirely in your browser, and your text is never uploaded.

Reading the colours

Green marks added text and red with a strikethrough marks removed text. Unchanged text is plain. The colours are supplemented by underline and strikethrough styling so that the output does not rely on colour alone.

Frequently asked questions

How do I compare two texts?

Paste the original into the left box and the new version into the right box. Differences are highlighted automatically.

Which comparison mode should I use?

Lines for code and lists, words for prose and characters for tiny edits such as typos.

What do the colours mean?

Green is text added in the second version; red with a line through it was removed from the first.

Why is the comparison refused for my large text?

Word and character modes need a lot of memory for long texts. Use line mode instead.

Is my text uploaded?

No. The comparison happens in your browser.

More free tools