Free Text Diff Checker

Compare two texts and highlight every difference using an LCS algorithm โ€” the same approach as git diff. Line, word, and character modes with split and unified views, similarity score, and smart ignore options.

LCS Algorithmโšก Real-time๐Ÿ”’ Private
โ€”
Lines Added
โ€”
Lines Removed
โ€”
Unchanged
โ€”
Text A Words
โ€”
Text B Words
โ€”
Similarity
1 lines ยท 0 chars
1 lines ยท 0 chars
Mode:
View:
๐Ÿ”

Paste two texts above to start comparing

Differences highlight in real time as you type. Try the sample texts to see the tool in action.

Who Uses a Text Diff Checker?

โœ๏ธ

Writers & Editors

Compare draft revisions to see exactly what changed between iterations. Track editorial suggestions without losing any context from the original manuscript.

๐Ÿ’ป

Developers & Engineers

Review code changes outside a terminal, compare config files, diff API responses, or check documentation updates before committing to version control.

๐Ÿ“‹

Legal & Compliance

Compare contract versions, policy documents, and terms of service revisions to identify every inserted, removed, or modified clause with full precision.

๐Ÿ“š

Students & Academics

Compare essay drafts, check plagiarism against a source, or identify differences between two versions of a research paper or literature review.

๐ŸŒ

Translators & Linguists

Compare source and translated texts to verify coverage, check that no sentences were skipped, and validate terminology consistency across versions.

๐Ÿ“ˆ

SEO & Content Teams

Diff content updates to ensure SEO-critical elements (headings, meta text, keywords) were not accidentally removed or altered during a revision.

How the Diff Algorithm Works

1

Tokenise

Text is split into tokens โ€” lines (line mode), words split on whitespace (word mode), or individual characters (char mode).

2

LCS Compute

The Longest Common Subsequence (LCS) algorithm โ€” the same one used by git โ€” finds the largest set of tokens that appear in both texts in order.

3

Mark Changes

Tokens in the LCS are marked 'equal'. Everything in Text A but not the LCS is 'removed'. Everything in Text B but not the LCS is 'added'.

Frequently Asked Questions

How does the diff algorithm work?

This tool uses an LCS (Longest Common Subsequence) algorithm โ€” the same foundational approach used by git diff. It finds the longest sequence of tokens that appear in both texts in the same order, then marks everything else as added or removed. This guarantees the minimal edit distance between the two texts.

What is the difference between Line, Word, and Character modes?

Line mode splits both texts by newline (\n) and compares line by line โ€” ideal for code, documents, and multi-paragraph text. Word mode splits by whitespace and compares individual words โ€” best for prose editing. Character mode compares every single character โ€” useful for precise typo detection and short strings.

What do the similarity percentage and score mean?

Similarity is calculated as (unchanged tokens ร— 2) / (total tokens in both texts), expressed as a percentage. 100% means the texts are identical. 0% means they share no common tokens. This metric is equivalent to a simplified Dice coefficient.

What does 'Ignore Whitespace' do?

Ignore Whitespace trims leading and trailing spaces from each line before comparison. This means a line with extra indentation or trailing spaces is treated as equal to the same line without. It does not ignore spaces within a line.

What does 'Ignore Case' do?

Ignore Case converts both texts to lowercase before comparison. 'Hello' and 'hello' are treated as identical. The original capitalisation is still shown in the output for readability.

Can I use this to check for plagiarism?

This tool compares two specific texts you provide โ€” it does not search the web or any database. For academic plagiarism detection, use a dedicated service. However, this tool is very useful for comparing a suspected plagiarised passage against an original source you have access to.

Is my text sent to any server?

No. All diff computation happens locally in your browser using JavaScript. Neither Text A nor Text B is ever sent to our servers, stored in any database, or shared with any third party.

What is the maximum text size I can compare?

There is no hard limit. For texts over 600 lines or 600 tokens per mode, the tool automatically switches to a faster prefix/suffix trimming algorithm that is slightly less precise but handles large inputs without any slowdown.

Further Reading