Text Compare

Compare two texts and see the differences highlighted.

Mode
Original Text
Modified Text
info

About Text Compare

Text Compare is a free online diff tool that takes two blocks of plain text — an original and a modified version — and instantly shows exactly what changed between them. Using the Myers diff algorithm, the tool marks every addition in green and every deletion in red, so you can scan the changes at a glance rather than reading both documents word by word.

The tool supports three comparison modes that give you control over how much granularity you need. Line mode works best for code, config files, and structured documents where each row is a discrete unit. Word mode is ideal for prose and contract drafts where individual word substitutions matter. Character mode exposes the smallest possible changes, such as a switched punctuation mark or a single letter typo that word mode would miss. You can also switch between split view (original on the left, modified on the right) and unified view (all changes in a single scrollable column) depending on whether you want spatial context or a compact changelog.

Every comparison runs entirely inside your browser — no text is sent to any server, logged, or stored anywhere. You can safely paste confidential documents, source code with proprietary logic, or legal drafts without worrying about privacy. There are no file-size limits, no rate limits, and no account required.

star

Key Features

check_circle

Three comparison granularities

Switch between line, word, and character modes to match the nature of your content. Line mode suits code; word mode suits prose; character mode catches typos invisible to word-level diffing.

check_circle

Split and unified views

Split view places the original and modified texts side by side with synchronized row alignment. Unified view stacks changes into a single column, matching the format of git diff output.

check_circle

Ignore case and whitespace options

Check "Ignore Case" to treat capitalisation differences as equal, and "Ignore Whitespace" to skip indentation or extra spacing — so only meaningful content changes appear in the result.

check_circle

Change statistics summary

After each comparison, a stats bar shows the exact count of additions, deletions, and unchanged units so you can gauge the extent of changes before reading the full diff.

check_circle

Copy diff to clipboard

Export the comparison result in a standard patch-style format (lines prefixed with + and -) ready to paste into a ticket, email, or code review comment.

check_circle

Fully private, client-side processing

The Myers diff runs entirely in your browser. No text leaves your machine, making it safe for source code, legal text, or any confidential content.

help

How to Use

01

Enter Both Texts

Paste or type the original text on the left and the modified text on the right.

02

Choose Mode and Options

Select line, word, or character mode. Toggle Ignore Case or Ignore Whitespace if needed.

03

Compare

Click "Compare" to run the diff and see additions highlighted in green and deletions in red.

04

Review and Export

Switch between split and unified views, then use "Copy Diff" to export the result in patch format.

code_blocks

Example

In line mode, the tool marks the changed line as a deletion (red) in the original and an insertion (green) in the modified version. Unchanged lines appear without highlight.

Original text
Version 1.2 release notes
- Fixed login timeout bug
- Improved dashboard load speed
- Added CSV export feature
Diff result (unified view)
  Version 1.2 release notes
- - Fixed login timeout bug
+ + Fixed login session timeout bug
  - Improved dashboard load speed
  - Added CSV export feature
+ + Added PDF export feature
lightbulb

Common Use Cases

  • arrow_circle_right

    Reviewing document revisions

    Paste two versions of a contract, policy document, or technical specification to see every clause that was added, removed, or reworded — without diffing the PDFs in an external app.

  • arrow_circle_right

    Auditing configuration file changes

    Compare two .env, .yaml, or .json config files in line mode to see exactly which keys changed between deployments, catching accidental setting regressions before they reach production.

  • arrow_circle_right

    Checking LLM output consistency

    When you run the same prompt twice or compare a model-generated draft to an edited version, word or character mode reveals subtle rewording that line mode would miss, helping you evaluate edit quality.

  • arrow_circle_right

    Verifying copy edits in prose

    Writers and editors can paste a before-and-after draft to confirm that only intended changes were made — and that no unintended deletions slipped through during revision.

  • arrow_circle_right

    Spotting accidental whitespace or casing changes

    Use the Ignore Whitespace and Ignore Case options to filter out formatting noise and focus exclusively on content changes, which is useful when comparing text copied from different editors or systems.

quiz

Frequently Asked Questions

What is the Text Compare tool? expand_more
Text Compare is an online diff tool that compares two texts side by side and highlights the differences. It shows additions in green and deletions in red, making it easy to spot changes between document versions.
What comparison modes are available? expand_more
You can compare by line (best for code and structured text), by word (best for prose), or by character (best for finding small changes like a single changed letter or punctuation mark). Each mode provides a different level of granularity.
Can I ignore case or whitespace differences? expand_more
Yes. Use the "Ignore Case" option to treat uppercase and lowercase letters as identical, and "Ignore Whitespace" to skip differences in spacing and indentation so only meaningful content changes appear.
Is my text secure? expand_more
Yes. All comparison processing happens locally in your browser using JavaScript. No text is sent to any server, logged, or stored anywhere — making it safe for confidential documents, source code, and legal drafts.
How is Text Compare different from the JSON Compare tool? expand_more
JSON Compare is designed specifically for structured JSON data: it understands object keys and array elements and can detect semantic differences regardless of formatting. Text Compare treats input as plain text only, so it is the right choice for prose, config files, markdown, code, and any content that is not valid JSON.
What diff algorithm does the tool use? expand_more
The tool uses the Myers diff algorithm, which produces the shortest possible edit script (fewest additions and deletions) between two sequences. This is the same algorithm used by git diff. For very large inputs it falls back to a look-ahead heuristic to avoid performance issues.
What does the "Copy Diff" button export? expand_more
It copies the result in a patch-style plain-text format. In line mode, each changed line is prefixed with "- " for deletions and "+ " for additions, matching standard Unix diff output. In word and character modes, deletions are wrapped in [-...-] and insertions in {+...+}.
Is there a limit on how much text I can compare? expand_more
There is no hard limit. The tool runs entirely in your browser, so practical limits depend on your device memory. For inputs exceeding roughly 10 000 diff units the algorithm automatically switches to a faster heuristic to keep the comparison snappy.