Skip to main content

Text Diff / Compare

Paste two texts and instantly see additions, deletions and differences — line or word level.

What is a text diff?

When you have two versions of the same thing — a draft before and after edits, two config files, two pasted snippets — the fastest way to see what changed is a diff. This text diff tool compares two texts side by side and highlights additions (green) and deletions (red), at either the line or word level. Everything runs locally in your browser, with no upload.

How to use

  1. Paste the "original" and "changed" texts into the two boxes.
  2. The result appears instantly, with a summary of how many lines were added and removed.
  3. Switch to "word" diff to see small in-sentence changes.

Common use cases

  • Compare two versions of code or a config file.
  • See exactly what changed in a contract or piece of copy.
  • Find the differences between two lists. Want to normalize formatting first? Use the text cleaner.

Why does changing one word light up the whole line?

In line diff, a line counts as "changed" if any character differs — so it shows as a red line plus a green line (old removed, new added) even if you only changed one word. That's not a bug; it's the definition of line-level comparison. To see exactly which word changed in a sentence, switch to word diff — it colors only the differing words. Conversely, for code, config files and lists (where a "change" is naturally a whole line), line diff is clearest. One more thing: a diff is exact, character for character, so two files that differ only in trailing spaces or line endings look noisy — normalize them first with the text cleaner and the real differences surface.

Frequently Asked Questions

Is my text uploaded?

No. The comparison runs entirely in your browser with JavaScript. Neither text is ever sent to a server, so it is safe for comparing confidential config files or code.

What is the difference between line and word diff?

Line diff compares whole lines — best for code, config files and lists. Word diff shows exactly which words changed — best for spotting small edits within a sentence. Switch anytime.

Does it ignore whitespace or case?

By default it compares exactly, so whitespace and case differences are highlighted. If you want to ignore them, normalize the format first with the text cleaner and then compare.

Can it compare very long text?

Yes, as long as it fits in browser memory. A few thousand lines is usually fine; very large inputs take a moment to diff.

Related reading

How to Compare Two Texts and See Exactly What Changed →

Embed this tool

Add this tool to your own website or blog for free — just copy and paste the code below (it includes a link back to this site).