Free Text Diff Tool

Paste two versions of a text (or load two files) and see exactly what changed: removed text in red, added text in green, line by line, word by word or character by character. Switch between side-by-side and inline views, ignore case or whitespace, and export the result as an HTML report or a .patch file. The comparison runs in your browser, so nothing is uploaded.

Color Legend

Green = added text
Red = removed text
= a removed or added line break

At line level, an edited line is shown on one row as removed (left) and added (right), with the changed words in a darker shade. At every level, Windows (CRLF) and Unix (LF) line breaks count as the same; only the .patch download, which compares the texts exactly, records a change of line endings.

โœ“ Multiple Diff Levels

Compare at character, word, or line level. The .patch download is a standard unified diff: apply it with patch original.txt changes.patch, or with git apply changes.patch in a folder where the original is saved as original.txt.

โœ“ Privacy First

All comparisons happen in your browser, and loaded files are read locally. Your text never leaves your device.

Compare Two Texts Online: Free, Private Diff Checker

A text diff tool compares two versions of a text and shows what was added, removed or left unchanged. To compare two texts online with this free diff checker, paste the original into Original Text and the new version into Modified Text. Removed text turns red, added text turns green, and the tool counts the changes by line, word or character. Nothing is uploaded: the comparison runs in your browser, and you can check the Network tab in your browser's DevTools.

The comparison updates as you type. Choose Side-by-Side or Inline under View Mode, pick Line, Word or Character under Diff Level, then export with Copy Diff Report, Download HTML or Download .patch. The engine is Myers' diff algorithm, the same family of method used by GNU diff and Git, so it finds a shortest list of edits whenever the texts are close enough to compare exactly.

Before comparing, tidy both versions the same way so only real edits remain: run the line sorter on two lists, strip spacing with remove empty lines, or format JSON with the JSON formatter so key order and indentation line up.

Text Diff Table of Use: Inputs and Results

Counts below come from running the real comparison on each pair.

Use caseOriginal and ModifiedSettingResult
Config file changeport=8080 and debug=false become port=9090 and debug=true; host=localhost is unchangedLineAdded 2, Removed 2, Unchanged 1; the changed words are shaded darker
Edited sentenceThe quick brown fox jumps and The quick red fox leapsWordRemoved: brown, jumps. Added: red, leaps. Unchanged 3
Spelling variantcolour and colorCharacterOne removed character (u), five unchanged
Capitalisation onlyHello World and hello worldLine, then tick Ignore caseOne changed line; with Ignore case: "No differences"
Re-indented codeTwo spaces before run(); against a tabLine, then tick Ignore whitespaceOne changed line; with Ignore whitespace: no differences
Re-wrapped paragraphThe same sentence split over two lines against one lineWord, with Ignore whitespaceNo differences (line breaks are ignored at word level)
Review a long fileTwo versions of a long log or scriptLine, then tick "Only changed lines (+3 context)"Unchanged runs collapse to "N unchanged lines hidden"
Share an edit as a patchThe config pair above, each ending with a line break, original loaded from config.txtDownload .patch--- a/config.txt, +++ b/config.txt and one hunk, @@ -1,3 +1,3 @@

Line, word or character level

LevelComparesSuits
LineWhole lines; changed lines get word-level shadingCode, configs, lists, logs
WordWords, numbers and punctuation marks, ignoring spaces in the countsArticles, contracts, copy edits
CharacterEach character, spaces and line breaks included; accents and emoji stay wholeTypos, IDs, short strings

Text Diff Tool Features

  • Two views: side-by-side or inline. Line level adds line numbers on both sides and stacks removed and added lines inline; word and character levels show the text without line numbers, with removed parts struck through inline.
  • Three levels: line, word and character, with a count of added, removed and unchanged items for the level you chose.
  • Ignore case and Ignore whitespace: at line level whitespace is ignored inside lines; at word and character level it is ignored everywhere, line breaks included.
  • Only changed lines: shows three lines of context around each change and folds the rest (line level only).
  • File loading: text files up to 20 MB each; a file that looks binary is refused with a message.
  • Exports: a plain-text report you can copy, an HTML report saved as diff-report.html, and a unified diff saved as changes.patch.
  • Swap and Clear: Swap exchanges the two texts and their file names; Clear empties both.
  • Line-ending tolerance: Windows and Unix line breaks are not reported as changes in the view.

Limits: the on-screen line view shows the first 5,000 rows, so use "Only changed lines" or the HTML report for longer diffs. The .patch file compares the exact texts and ignores the case and whitespace options. For a quick equality check between two files of any type, a file hash calculator compares checksums instead of content.

How to Use the Text Diff Tool

  1. Paste the older version into Original Text and the newer version into Modified Text, or press Load Original File and Load Modified File.
  2. Pick View Mode (Side-by-Side or Inline) and Diff Level (Line, Word or Character).
  3. Tick Ignore case or Ignore whitespace if capitalisation or spacing changes are noise, and Only changed lines to shorten a long file.
  4. Read the Differences panel and the Added, Removed and Unchanged counts above it.
  5. Press Copy Diff Report, Download HTML or Download .patch, then Clear to start again.

Who Can Use the Text Diff Tool

Developers compare two versions of a config, query or script, and can run a snippet through the SQL formatter or the JavaScript beautifier first so formatting noise does not hide the real change. Writers and editors compare drafts, and a word counter shows how much the length moved. Anyone reconciling two exports can sort lines, remove duplicate lines and then diff.

Support and operations staff compare a working and a broken configuration. If a difference turns out to be only capitalisation, the text case converter normalises it, and find and replace fixes a repeated edit across a whole file. The line counter confirms how many lines a long file has before you load it.

Text Diff FAQs

How do I compare two texts online?

Paste the original version into Original Text and the changed version into Modified Text, or use Load Original File and Load Modified File. The differences appear straight away as you type: removed text in red, added text in green, plus counts of added, removed and unchanged lines, words or characters. Use Swap if you pasted the versions in the wrong boxes.

What is the difference between line, word and character diff?

Line level compares whole lines and suits code, configuration files and lists; an edited line sits side by side with its changed words in a darker shade. Word level compares word by word, which suits prose. Character level marks each changed character, including accents and emoji, so it catches typos but is slower on long texts.

How do I ignore whitespace or letter case when comparing text?

Tick Ignore whitespace or Ignore case above the boxes. Re-indented code and doubled spaces then stop counting as changes, and "Hello" matches "hello". At word and character level, Ignore whitespace also ignores line breaks, so a re-wrapped paragraph matches the original. Both boxes still show your text exactly as you entered it.

Can I compare two files instead of pasting text?

Yes. Load Original File and Load Modified File read plain-text files such as .txt, .md, .csv, .json, .xml, .html, .css, .js and .py, up to 20 MB each. Your browser reads them locally and nothing is uploaded. Binary formats such as PDF, Word, Excel and images are refused, because they are not plain text.

What is a .patch file and how do I apply it?

The Download .patch button saves changes.patch, a unified diff in the format of "diff -u" and "git diff", with three lines of context per change. Run "patch original.txt changes.patch" to turn the original into the modified text exactly, or "git apply changes.patch" in a folder holding the original. The ignore options do not apply to a patch.

Why does the whole middle of my diff show as removed and re-added?

Texts that differ in too many places cannot be compared exactly within the browser's time and memory limits. The tool then marks the differing middle section as removed and re-added and shows a yellow notice. The result is still correct, just not the smallest. If you are on Word or Character level, switch to Line level, which has far fewer items to compare; otherwise compare the files in smaller sections.

Does Windows versus Linux line-ending style count as a difference?

No. At every level, Windows (CRLF) and Unix (LF) line breaks are treated as the same, and the tool says so when that is the only difference. Only the .patch download compares the exact texts, so it does record a change of line endings. Use it when you need to know that the line endings really changed.

Is it safe to compare confidential text in an online diff checker?

Here it is: the comparison runs in your browser with JavaScript, and loaded files are read locally, so your text is not sent to ZipConvert. You can check the Network tab in your browser's DevTools while you type. Nothing is saved when you close the tab, so confidential contracts, code and configuration files stay on your device.