Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Document & Text
  3. Text Diff & Compare Tool
Add to favorites

Text Diff & Compare Tool

Compare texts with side-by-side and unified diff views, line-by-line or character-level comparison, change statistics, and export to patch file

Text processed locallyMore document & textJump to full guide

Initializing in your browser…

You might also like

Image Text Extractor (OCR)

Read text off a picture with Tesseract, after preparation that measures the type and enlarges it: 8px text went from a 53 percent character error rate to 8. Every word carries a confidence and a box drawn on the picture.

Text Case Converter

Convert text between 17 cases with every rule stated: punctuation is a separator, acronyms survive, accents survive a URL slug, and Title Case follows a style you name (Chicago, AP or APA) rather than an unattributed word list

Text Statistics Analyzer

Six readability formulas, each computed from its own publication and shown with the definition, over counts whose rules are stated: characters as a reader sees them, and sentences that know an abbreviation from the end of one

Text Diff & Compare Tool: a worked example

A teammate pasted an "updated" config back to you and you need to see exactly what they changed before applying it.

Comparing

Left:  timeout = 30
Right: timeout = 60
       retries = 3
What Text Diff & Compare Tool produces

Diff, and a patch you can apply

--- original
+++ modified
@@ -1,2 +1,3 @@
-timeout = 30
+timeout = 60
+retries = 3

The comparison is a Myers diff, the 1986 algorithm behind git diff, with patience anchors for texts that are mostly different: 50,000 lines compare in about 25 milliseconds. What counts as the same line is five stated switches rather than a mode name (whitespace, case folded the Unicode way, blank lines, line endings, and the two spellings of an accent), and a setting changes what is compared and never what is shown, so every line keeps its own number in the file. The export is a real unified diff that patch can apply, over the whole comparison rather than the rows on screen. It runs entirely client-side, so pasting an internal config to compare it does not leak that config anywhere.

What is Text Diff & Compare Tool?

Paste the original and the modified text and this tool shows every addition, deletion and change, with a word or character level highlight inside each changed line. What counts as the same line is a set of stated choices rather than a mode name, and every line keeps the number it has in the file.

How it works

A diff tool is two decisions in a trenchcoat: which line of the second text corresponds to which line of the first, and what counts as the same line. Most tools make both silently.

The first is a Myers diff, the algorithm from the 1986 paper that git diff and Python difflib are built on, with patience anchors (the idea behind git diff --patience) for texts that are mostly different. That matters at size. The version this replaced built a full table of every line against every line, which is the square of the input in both time and memory whatever the two texts hold: measured as the comparison alone, 5,000 lines took 428 milliseconds and 10,000 took two seconds against a hundred million cells, and through the page it was far worse because the comparison also re-ran on every render rather than on every change. The same comparisons now take 8 milliseconds at 5,000 lines and 25 at 50,000, and 50,000 lines used to make the browser throw an allocation failure and take the whole tool down.

The second decision is five independent switches, each stated on the page. Line endings: a file written on Windows ends each line with a carriage return and a line feed, and comparing it against the same file written anywhere else marks every line as different unless you say the ending is not part of the line. Whitespace: exactly as written, ignoring space at the ends, or ignoring all of it, which is what makes a reindent invisible. Case: folded the Unicode way rather than by lower-casing, so the German sharp s equals ss, which lower-casing does not manage. Blank lines: left out of the comparison, and still shown, with the numbers they have in the file. Accents: an accented letter has two spellings in Unicode that look identical and are different strings, and NFC normalisation makes them equal.

A setting changes what is COMPARED and never what is shown. That sounds obvious and is easy to get wrong: dropping blank lines from an array and then using the array index as the line number renumbers every line after the first blank one, which is what happened here before this pass.

Inside a changed line you can highlight the difference by word or by character, and characters are grapheme clusters, so an emoji is one character rather than two halves of a surrogate pair. A block that moved rather than changed is pointed out: a line diff has no way to express a move, so both halves are found afterwards and labelled. The result carries a check that every line of both texts is accounted for, and the page shows it. The export is a real unified diff that patch can apply, over the whole comparison rather than the rows on screen; it used to be a file called diff.patch holding lines like "~ old (arrow) new" that nothing could apply.

How to use

  1. 1Paste the original text in the left panel
  2. 2Paste the modified text in the right panel
  3. 3Review the highlighted differences
  4. 4Toggle between side-by-side and unified view as needed

Key features

  • A Myers 1986 diff with patience anchors: 50,000 lines compare in about 25 milliseconds
  • Side-by-side, unified and inline views
  • Word or character level highlighting inside a changed line, with characters counted as a reader sees them
  • Five stated choices for what counts as the same line, including a Unicode case fold and NFC accents
  • A setting changes what is compared, never what is shown or how it is numbered
  • Moved blocks pointed out, with the reason a line diff cannot say it any other way
  • A check that every line of both texts is accounted for, shown on the page
  • Two similarity numbers with both definitions named, because the word has more than one
  • Export a real unified diff that patch can apply

When to reach for this

  • Reviewing code changes

    Compare two versions of source code to catch bugs and verify logic before committing or merging.

  • Tracking document revisions

    See exactly what was edited between drafts of contracts, reports, or articles.

  • Debugging config differences

    Compare configuration files across environments to pinpoint missing or changed settings.

  • Verifying translation accuracy

    Compare original and edited translations side by side to confirm nothing was accidentally omitted.

Frequently asked questions

What is the difference between side-by-side and unified view?

Side-by-side shows the original and modified text in parallel columns. Unified view displays both in a single column with + and - markers, similar to git diff output.

Can I compare entire files?

Yes, and you can upload them rather than pasting. Measured on 2026-09-03 through the page: 20,000 lines compare in about 15 milliseconds and 50,000 in about 25, with the rest of the time going on getting the text into the box. The rows on screen are capped so the browser stays responsive, and the page says how many it left out; the counts and the exported patch always cover the whole comparison.

Why does a moved block show as a deletion and an addition?

Because a line diff has no other way to say it. Any algorithm of this kind reports a block that changed position as removed from one place and added to another, and both halves are correct. This tool looks for the two halves afterwards and labels them, so you can see it was a move rather than two unrelated edits.

The two files look identical but every line is marked changed.

One of them was almost certainly written on Windows. A Windows file ends each line with a carriage return and a line feed, and a file written anywhere else ends it with a line feed alone, which is invisible on screen and a real difference in the bytes. The "Line endings do not matter" option is on by default here for that reason; turn it off when the endings are what you are checking.

What does the similarity percentage mean?

Whichever of two definitions you read. The number shown large is matched lines over the length of the longer text, which is what most readers assume. The other, printed under it, is twice the matched lines over the total length of both, which is what Python difflib ratio computes. They are different numbers and a tool showing one without saying which is not telling you much.

Does ignoring whitespace affect the results?

When enabled, the ignore-whitespace option treats differences in spaces, tabs, and trailing whitespace as non-changes, so only meaningful content differences are highlighted.

Private by design

Your text is processed locally in the browser. Nothing you paste or open is transmitted or logged.