Plain Text Diff

DIFF COMPARE TEXT DEVELOPER
Share:

Compare two blocks of text and see the differences highlighted line by line — additions in green, deletions in red. Side-by-side or inline. Free, private.

RT-TXT-052 · Text Tools

Plain Text Diff

Advertisement
After tool · AD-W1Responsive · Post-tool

How to Use the Text Diff Tool

Paste both versions

Put the original text on the left and the changed text on the right. They can be anything — code, prose, configuration, lists — and any length from a line to thousands of lines.

Set comparison options

Optionally ignore case or ignore whitespace differences, which is handy when you only care about meaningful changes and not formatting or capitalisation noise.

Compare

Press "Compare" and the differences are highlighted line by line — additions in green, deletions in red, and within changed lines the exact words that differ are marked, so you can see precisely what moved.

Switch views

Toggle between side-by-side (old and new in two columns) and inline (a single unified list with + and − markers). Everything runs in your browser — your text is never uploaded.

Advertisement
After how-to · AD-W2Responsive

Seeing Exactly What Changed

The Problem Diffs Solve

When two versions of a document look almost the same, spotting what actually changed by eye is slow and error-prone — you read both, lose your place, and miss the one altered number that mattered. A diff tool does that comparison for you, instantly and exactly. It is a staple of software development, where every code review and version-control commit is built on diffs, but it is just as useful outside it: a writer comparing two drafts of an article, a lawyer checking what changed between contract versions, a translator aligning a revised text, or anyone who has received an "updated" file and needs to know what is new. This tool takes your two texts and highlights every difference line by line — additions in green, deletions in red — and within a changed line it goes further, marking the precise words that differ so a single edited phrase doesn't make the whole line look rewritten.

Underneath, it uses the same kind of algorithm that powers professional diff tools: it finds the longest common subsequence of lines between the two texts — the largest set of lines that appear in both, in the same order — and treats everything else as added or removed. This is what makes a diff feel intelligent rather than naive. A line-by-line comparison that just walked both texts in lockstep would, after a single inserted line, mark everything below it as changed; the longest-common-subsequence approach instead recognises that those lines are unchanged and just shifted down, so it reports the one real insertion. The result is a minimal, accurate set of changes that matches what a careful human would conclude — and it does it in a fraction of a second even for long files. The two view modes serve different habits: side-by-side is best for reading the old and new in context, while inline is the compact, familiar format used in code reviews and patch files.

"A good diff doesn't just compare line by line — it finds the longest run of lines the two texts share, so a single inserted paragraph doesn't make everything below it look rewritten."

Private by Design

One thing that sets this tool apart from many online diff checkers is where the work happens: entirely in your browser. Your two texts are never uploaded to a server, stored, or transmitted — which matters a great deal when you are comparing source code, contracts, medical notes, or any document you should not be pasting into a random website. You can even use it offline once the page has loaded. The optional ignore-case and ignore-whitespace settings let you focus on substantive changes: ignore-whitespace collapses runs of spaces and trims line ends so that reformatting doesn't show up as a difference, and ignore-case treats "Hello" and "hello" as the same, which is useful when capitalisation is not the change you care about. Whether you are reviewing code, proofreading a revision, or just working out what someone changed in a shared document, a fast, accurate, private diff turns a tedious manual comparison into a glance.

10 Facts About Text Diffs

01

A diff finds the longest common subsequence of lines, then marks the rest.

02

This avoids marking everything after an inserted line as changed.

03

Within a changed line, the exact differing words are highlighted.

04

Diffs are the foundation of code review and version control.

05

Green means added, red means removed — a near-universal convention.

06

The original diff utility dates back to 1970s Unix.

07

Ignore-whitespace hides reformatting so you see real changes.

08

Side-by-side reads in context; inline is the patch-file format.

09

Your text never leaves your browser — fully private.

10

Writers, lawyers, and translators use diffs as much as developers.

Frequently Asked Questions

  • Paste the original text on the left, the changed text on the right, and press "Compare". The tool highlights every difference line by line — additions in green, deletions in red — and marks the exact words that differ within changed lines. You can switch between a side-by-side and an inline view, and optionally ignore case or whitespace.
  • Side-by-side shows the original and changed texts in two columns, aligned so you can read them in context — best for prose and documents. Inline shows a single unified list with + for added lines and − for removed ones, the familiar format from code reviews and patch files. Both highlight the same differences; pick whichever you find easier to read.
  • Both. It works at the line level first, then for lines that were changed rather than wholly added or removed, it does a second word-level comparison and highlights just the words that differ. So if you change one word in a long sentence, only that word is marked — the rest of the line is shown as unchanged context.
  • No. The entire comparison runs in your browser — your texts are never uploaded, stored, or transmitted to any server. This is important when comparing source code, contracts, or confidential documents that should not be pasted into a third-party website. You can even use the tool offline once the page has loaded.
  • Ignore case treats "Hello" and "hello" as identical, so capitalisation changes are not flagged. Ignore whitespace collapses multiple spaces and trims line ends, so reformatting — extra indentation or trailing spaces — doesn't show up as a difference. Both let you focus on substantive changes when formatting or case is just noise.
  • Yes — it works well on code, configuration files, JSON, CSV, and any text. The line-based comparison matches how developers think about changes, the inline view mirrors the patch format used in pull requests, and because nothing leaves your browser it is safe for proprietary code. For very large files the comparison may take a moment, but normal source files are instant.
  • It uses a longest-common-subsequence algorithm — the same approach as professional diff tools — which finds the minimal, correct set of changes rather than a naive line-by-line walk. This means an inserted line near the top doesn't make everything below it look changed; the tool correctly identifies which lines are genuinely added, removed, or modified.
  • There's no hard limit, but the comparison's effort grows with the size of both texts, so extremely large files (tens of thousands of lines) may take a noticeable moment. For everyday documents, code files, and articles it is effectively instant. If you are comparing huge files, comparing the relevant sections is faster.
  • Yes — that's a common use. Paste the old and new versions and the tool shows exactly which lines and words changed, which is far faster and more reliable than re-reading both by eye. Because the comparison runs entirely in your browser and nothing is uploaded, it is safe for confidential documents like contracts. For legally significant changes, of course, always have the final wording reviewed by the appropriate professional.
  • Completely free, with no account and no usage limit, and it collects no personal data — every comparison runs locally in your browser. Compare as many texts as you like.

Related News

You may be interested in these recent stories from our newsroom.

View all news →
Advertisement
Pre-footer · AD-W3 728 × 90

75 more free tools

Calculators, converters, security tools — no signup.