DiffDuo

Free online diff checker

Text Compare: spot every difference

Compare two texts, files or code and see the differences instantly: added lines, removed lines and changed words, side by side, git diff style. Private and free, right in your browser.

 
 
Comparing…

How to compare two texts online

  1. Paste or open the originalPut the first version in the Original text box. You can paste text, or open or drag and drop a file.
  2. Add the changed versionPut the second version in the Changed text box. The comparison runs automatically as you type.
  3. Review the differencesRemoved lines are red, added lines are green, and the exact words that changed are highlighted inside each line.

A fast, private diff checker

Side-by-side or unified diff

Read changes in two columns, or switch to a single-column unified diff exactly like git diff.

Word-level highlights

See which words and characters changed within a line, not just which lines are different.

Compare files

Open or drag and drop two files to compare them. Works with any plain-text file up to 50 MB.

Ignore whitespace and case

Skip differences in spaces, tabs, indentation or capitalization to focus on the changes that matter.

Handles huge files

Compares files with 100,000+ lines in a background thread, so the page never freezes.

100% private

Nothing is uploaded. Your text is compared on your own device, so it's safe for confidential work.

What you can compare

Code

Compare source code in JavaScript, TypeScript, Python, Java, C#, C++, Go, PHP, Ruby and any other language to review changes before a commit.

JSON, XML, YAML and CSV

Find the difference between two config files, API responses, data exports or spreadsheets saved as CSV.

Documents and writing

Compare two versions of an essay, article, contract or translation and see exactly what was edited.

Lists

Compare two lists of names, emails, IDs or URLs to find which items were added or removed.

SQL and logs

Check two SQL queries or database schemas, or compare log files to spot what changed between runs.

Strings and snippets

Compare two strings or short snippets character by character to find a hidden typo or extra space.

How to read the diff

  • −Red lines exist only in the original text: they were removed.
  • +Green lines exist only in the changed text: they were added.
  • abDarker highlights mark the exact words that changed inside a modified line.
  • @@Hunk headers such as @@ -12,7 +12,9 @@ give the starting line and number of lines in each version. Unchanged lines in between are collapsed; click Expand to show them.

Frequently asked questions

How do I compare two texts online?

Paste the original text into the left box and the changed text into the right box. DiffDuo compares them instantly and highlights every difference: removed lines in red, added lines in green, and the exact changed words inside each line.

What is a diff checker?

A diff checker (or diff tool) finds the differences between two versions of a text. It shows which lines were added, deleted or changed, the same way git diff shows changes in source code.

Is my text uploaded to a server?

No. The comparison runs entirely in your browser, so your text and files never leave your device. This makes DiffDuo safe for confidential documents, code and configuration files.

Can I compare two files?

Yes. Click Open or drag and drop a file onto either box. Any plain-text file works, including code, JSON, XML, YAML, CSV, SQL, Markdown, HTML and log files, up to 50 MB each.

How do I ignore whitespace or capitalization differences?

Turn on Ignore whitespace to treat lines as equal when they differ only in spaces, tabs or indentation, and Ignore case to ignore uppercase and lowercase differences.

What is the difference between split and unified view?

Split view shows the two texts side by side, which is easiest to read. Unified view shows a single column with removed lines marked with a minus and added lines marked with a plus, the same format as git diff and patch files.

Can it compare large files?

Yes. DiffDuo compares files with hundreds of thousands of lines in a background thread, so the page stays responsive. Two 4 MB files with 100,000 lines each compare in well under a second.

Is DiffDuo free?

Yes. DiffDuo is completely free, with no sign-up, no limits on the number of comparisons and no ads.