Tools › Build › Text Diff
🔍

Text Diff Checker – Compare Two Texts

Paste two versions of any text or code and instantly see what was added, removed or edited — down to the individual word.

✅ 100% Private
⚡ Instant Results
🎯 Word-level Highlights
⇄

Enter your texts

Original on the left, changed version on the right.

Differences
Advertisement

💡 How does a diff work?

The tool finds the longest common sequence of lines between the two texts. Lines only in the original are shown in red, lines only in the changed version in green, and edited lines get a second pass that highlights exactly which words changed. Everything is computed locally in your browser.

How to use

  1. Paste the original text on the left and the changed version on the right (code, prose, config files, JSON — anything).
  2. Choose options: ignore case, ignore whitespace or ignore trailing spaces.
  3. Click Compare. Removed lines are red, added lines green, and the exact changed words are highlighted inside edited lines.
  4. Switch between Inline and Side-by-side views, then copy or download the diff.

What is a text diff?

A diff lists the smallest set of changes that turns one text into another. Developers use diffs in Git to review code; writers use them to compare drafts and contracts; admins use them to spot what changed in a config file. This tool compares line by line using the longest-common-subsequence method, then compares the words inside each changed line.

Reading the result

  • Red lines with − exist only in the original text.
  • Green lines with + exist only in the changed text.
  • Highlighted words inside a red/green pair show exactly what was edited.
  • Grey lines are unchanged. The two number columns show the line numbers in each version.

Frequently asked questions

Is my text uploaded or stored?

No. The comparison runs entirely in your browser. Your text never leaves your device, so it is safe to compare private code, contracts or logs.

How do I compare two files?

Open each file in any text editor, copy its contents and paste them into the two boxes. Works for source code, JSON, CSV, HTML, Markdown, logs and plain text.

Why does the tool show a whole line as changed when I only changed one word?

The line is marked as removed and re-added, and the changed words are highlighted inside it. Switch on “Ignore whitespace” if the only difference is spacing or indentation.

What do “Ignore case”, “Ignore whitespace” and “Ignore trailing spaces” do?

They change how lines are matched, not how they are displayed. Ignore case treats “Hello” and “hello” as equal; Ignore whitespace removes all spaces and tabs before comparing; Ignore trailing spaces drops spaces at the end of each line (on by default because they are invisible).

Is there a size limit?

The tool handles very large inputs: similar texts of tens of thousands of lines compare instantly. If two long texts are almost completely different the comparison may be refused — split them into smaller sections in that case.

Can I save or share the diff?

Use “Copy diff” or “Download .diff” to get the result in the familiar unified style (lines starting with +, − and a space), ready to paste into an email, ticket or code review.