Text Diff Checker – Compare Two Texts Side by Side

Paste the original text on the left and the modified version on the right to see exactly what changed. Choose line, word or character level, toggle ignore whitespace and ignore case, and switch between side-by-side and unified views. Free, private, and runs entirely in your browser.

Compare inputs

Original on the left, modified on the right
Detail mode
View
Tip: Paste code, prose, config files, or contracts. Use Line mode for code, Word mode for prose, and Character mode when a single digit matters. Turn on ignore options to filter out indentation or capitalisation noise.

Diff output

Run a comparison to see results
Added
0
Removed
0
Unchanged
0
Similarity
0%

Your diff will appear here

Paste two texts above and click Compare to see the differences.

What does this Text Diff Checker do?

This free online text diff checker compares two versions of text and shows you exactly what changed. Paste the original in the left panel and the modified version in the right, click Compare, and the tool highlights additions in green and deletions in red — instantly, with no server round-trip.

Unlike a simple character counter, a diff checker understands structure. It matches lines that stayed the same and only marks what actually changed. This makes it useful for reviewing code edits, checking document revisions, comparing configuration files, or spot-checking a translation. It is effectively a browser-based equivalent of the Unix diff command and the git diff output.

Everything runs locally in your browser. The texts you paste never leave your device, there is no signup, and there are no usage limits. Compare as many texts as you want, as many times as you want.

How to compare two texts and find differences

  1. Paste the original text into the left panel. This is your "before" version.
  2. Paste the modified text into the right panel. This is your "after" version.
  3. Choose comparison options. Pick line, word or character level. Toggle ignore whitespace and ignore case if you want to filter out noise.
  4. Click Compare. The diff engine highlights additions in green, deletions in red, and shows unchanged lines as context. The stats bar shows added, removed, unchanged counts and a similarity score.
  5. Switch views. Side-by-side shows original and modified in parallel columns. Unified combines both into a single column with + and - prefixes, like git diff.
  6. Copy or download. Copy the diff output to your clipboard or download it as a .diff file in standard unified diff format.

Line, word or character — which one should you use?

The comparison always starts by matching lines. The detail mode decides what gets marked inside a line that counts as changed.

ModeWhat it doesBest for
LineMarks a changed line as a whole. Fastest option.Code, logs, config files, structured text where line breaks carry meaning
WordHighlights only the words that changed inside a line.Articles, contracts, translations, prose — the default choice for most text
CharacterTakes the difference down to single characters.Identifiers, hashes, long numbers, spotting a single changed digit or typo

If you are not sure, start with Word mode. It gives you the most useful level of detail for everyday text. Switch to Line for code and Character for precise edits.

Why use this Text Diff Checker?

FeatureWhat it gives you
Instant comparisonThe diff runs entirely in your browser, so results appear the moment you click. No server round-trip, no waiting.
Three comparison modesCompare by line, word or character. Choose the level of detail that matches your task.
Side-by-side + unifiedRead the diff in parallel columns or as a single unified stream with + and - prefixes, like git diff.
Ignore whitespace & caseFilter out indentation, spacing and capitalisation differences when they are not what you are looking for.
100% privateEverything runs in your browser. Your texts never leave your device — no server, no logs, no tracking.
Works offlineOnce the page loads, you can compare texts without an internet connection. Bookmark it for offline work.

Who uses a text diff checker?

This online text diff tool is used by developers, editors, writers, translators and anyone who reviews revisions. Some of the most common use cases:

Developers and programmers

  • Review code changes before committing or opening a pull request.
  • Compare configuration files (JSON, YAML, INI) between environments.
  • Check generated output against expected output during debugging.
  • Spot differences in SQL migrations, Dockerfiles or CI configs.
  • Verify that a refactor changed only what it was supposed to.

Writers, editors and students

  • Compare two drafts of an article, essay or report.
  • Check what changed between a client's first and second version of a document.
  • Verify that a translation matches the source structure.
  • Spot accidental deletions or additions during editing.
  • Track revisions in collaborative writing projects.

SEO and content teams

  • Compare meta descriptions, title tags or on-page copy before and after an update.
  • Audit content changes after a site migration.
  • Check that a rewritten page preserved key information.
  • Compare competitor content updates over time.

Legal and administrative work

  • Compare contract versions to spot clauses that changed.
  • Verify that a policy update changed only the intended sections.
  • Check form letters or templates for unintended edits.
  • Review translations of legal documents line by line.

How the diff algorithm works

This tool uses the Myers diff algorithm — the same algorithm behind git diff, GNU diff, and most professional diff tools. It is mathematically guaranteed to return the shortest list of changes that transforms one text into the other, so you are never shown a change that did not happen.

At a high level, the algorithm builds a table comparing both texts and finds the longest common subsequence (LCS). Everything outside that subsequence is either an addition or a deletion. When you enable word or character-level diff, the same algorithm runs a second time inside each changed line pair to pinpoint exactly which tokens changed.

This is not a crude "line by line comparison" — it understands insertions, deletions and rearrangements, so the result is as accurate as the diff you would see in a version control system.

Text diff best practices

  • Use line mode for code. Line breaks carry meaning in code, logs and structured data. Line mode gives you the cleanest view.
  • Use word mode for prose. Articles, contracts and emails read better when only the changed words are highlighted.
  • Use character mode for precision. When a single digit in an ID, hash or version number matters, character mode catches it.
  • Ignore whitespace when indentation is noise. If one version uses tabs and the other uses spaces, turn on Ignore whitespace to focus on real changes.
  • Ignore case when capitalisation is irrelevant. Useful for comparing data exports where case may differ but meaning is the same.
  • Download the .diff for sharing. The unified diff format is universally understood and can be applied with patch or git apply.

If you need to format the text before comparing — for example, to normalise JSON or CSS — use our JSON Formatter or CSS Formatter first, then paste the clean output here.

Frequently asked questions

A text diff checker compares two versions of text and highlights what was added, removed or changed. It is used for code review, document editing, contract comparison and any workflow where you need to spot differences quickly.
Yes, completely free. No signup, no watermark, no hidden charges. Compare as many texts as you want, as many times as you want, for personal or commercial use.
Line mode marks a changed line as a whole. Word mode highlights only the words that changed inside a line. Character mode goes down to individual characters, useful for spotting a single changed digit or letter.
Yes. Enable Ignore whitespace to treat different indentation or spacing as equal. Enable Ignore case to treat uppercase and lowercase as identical. These options help you focus on meaningful changes rather than formatting noise.
Side-by-side shows the original on the left and modified on the right with changes aligned. Unified combines both into a single column with + and - prefixes, similar to git diff output.
Yes. Use the Download .diff button to save the diff as a .diff file in standard unified diff format, compatible with patch and git apply.
No. Everything runs in your browser. The text you paste never leaves your device — no server processing, no logging and no data storage. Close the tab and it is gone.
Yes. Once the page loads, the diff checker works without an internet connection. All comparison happens locally in your browser using JavaScript.
Yes. Paste source code from any language — JavaScript, Python, HTML, CSS, JSON, YAML, SQL and more. Line-level comparison is best for code because line breaks carry meaning.
The tool handles texts of several thousand lines smoothly. For very large files, the comparison may take a moment, but it runs entirely in your browser without any server limit.