Text Editing & SearchLast updated: 2026-09-04

Text Diff / Compare

Compare two texts in your browser. See line-by-line additions and deletions side by side, with instant stats on what changed.

Open My tools
ShareXfB!L

How to use

  1. 1

    Enter texts

    Paste two texts or load them from files.

  2. 2

    Compare

    Press "Compare" to compute the line diff.

  3. 3

    Check the results

    View the side-by-side or unified diff, then copy or download the Unified diff.

Features

  • Side-by-side and unified diff views
  • Automatic stats for added, deleted and unchanged lines
  • Load text files (one per side)
  • All in your browser - nothing is uploaded

Use cases

Review code changes

Compare before and after versions of source code and catch unintended changes.

Check document revisions

Compare the previous draft with the revised text to see exactly which sentences changed.

Diff logs and configs

Line up logs from a healthy run versus a failing one, or config files from different environments.

Details

A text diff compares two versions of text and shows exactly what was added and what was removed. It is a routine part of reviewing code changes, contract revisions, meeting-minutes updates and configuration files - anywhere two versions need to be reconciled.

This tool compares text line by line and finds the minimal edit script with the Myers O(ND) algorithm. Common lines at the start and end are trimmed automatically, so even long texts are diffed quickly and accurately. You can read the result side by side, or as a single-column unified diff.

Everything runs in your browser - the texts you paste are never sent to a server. The result can be copied as a Unified diff, which you can share by email or chat or save as a .diff file.

FAQ

Is the comparison line-based?

Yes. Texts are split on line breaks and compared line by line, classifying each line as added, deleted or unchanged.

How long can the texts be?

Each text is limited to 200,000 characters and 20,000 lines. If your texts are longer, split them into smaller parts.

Can I save the diff as a file?

Yes. Download the result as a Unified diff (.diff) file, or copy it and paste it into email or chat.

Are my texts uploaded to a server?

No. The whole comparison happens in your browser and nothing you enter is transmitted.

All processing happens in your browser. Your files are never uploaded.

Did you know?

Line endings and spaces can change a text comparison. Check the underlying input as well as how it looks.

Optional usage measurement settings

Only with your consent, a random browser ID and tool/learning events are sent to measure return visits. This is pseudonymous measurement. Inputs, answers, keys, files and search terms are excluded. Consent expires after 90 days. Declining does not limit any feature.

Measurement is off.

Retention and privacy