# Text Diff Checker

> Compare two texts or files and see every added, removed and changed line, with changed words highlighted, side by side or inline. Free, private.

Canonical: https://cromagnon.app/tools/text-diff
Last updated: 2026-10-26

- Category: Text
- Formats: TEXT
- Use it: https://cromagnon.app/tools/text-diff (free, runs in the browser)

## What it does

Compare two versions of a text and see exactly what changed. Lines that were added, removed or edited are marked, and inside an edited line the changed words are highlighted, so a single altered comma stands out. View the result side by side or inline, ignore differences in capital letters or spacing, hide the unchanged parts, and copy the changes as a standard patch file.

## How to use it

1. Paste the original text on the left and the new version on the right, or press Open file on each side.
2. Read the summary: lines added, lines removed and how similar the two texts are.
3. Switch between Side by side and Inline, and tick Only changes to hide long unchanged parts.
4. Copy the patch or download it as a .diff file to share or apply the changes.

Tip: Pasting from Word, Google Docs or a PDF often brings extra spaces and line breaks. Tick Ignore spaces to see only the real wording changes.

## How the comparison works

The tool compares the texts line by line using Myers' algorithm, the same method Git uses to show code changes. It finds the smallest set of added and removed lines that turns the original into the new version, so moved or edited paragraphs aren't reported as a wall of changes.

When a removed line is replaced by an added one, the two are paired and compared again word by word. Words that were removed are struck through in red on the left, and new words are highlighted in green on the right. Spaces and punctuation count as their own pieces, so a changed full stop or a double space is easy to spot.

Line endings don't matter: a file saved on Windows (CRLF) and the same file saved on a Mac or Linux (LF) compare as identical.

## Reading the result

- **Green, +**: A line that exists only in the changed text.
- **Red, −**: A line that was removed from the original.
- **Highlighted words**: The exact words that differ inside a line that was edited.
- **Line numbers**: The left number is the line in the original, the right one the line in the new text.
- **Similarity**: The share of lines that are the same in both texts: 100% means identical.
- **⋯ unchanged lines hidden**: With Only changes ticked, long unchanged stretches are folded away, leaving three lines of context around each change.

## Ways to use a diff checker

- **Contracts and policies**: See exactly what the other side changed in a new draft, even when they didn't track changes.
- **Essays and articles**: Compare your draft with an edited version to learn from the editor's changes.
- **Code and config files**: Check what changed between two versions of a script, .env or JSON file before you deploy.
- **Translations and copy**: Spot sentences that were added to the source text after translation started.
- **Data exports**: Compare two CSV exports to find new, missing or edited rows.
- **Website text**: Paste the old and new copy of a page to review an update before it goes live.

## Patch files (unified diff)

Copy patch gives the changes in the unified diff format used by git diff, GitHub and the patch command. Lines starting with - were removed, lines starting with + were added, and the @@ -2,3 +2,4 @@ headers say where each change is: from line 2, 3 lines of the original became 4 lines in the new version.

Developers can apply a patch with git apply changes.diff or patch -p0 < changes.diff. For everyone else, it's a compact way to send only the changes by email or chat instead of two whole documents.

## Options explained

- **Ignore case**: Hello and hello count as the same, useful when only the capitalisation was changed.
- **Ignore spaces**: Several spaces count as one, and spaces at the start and end of a line are ignored, so re-indented code or re-wrapped text doesn't show as changed.
- **Swap**: Exchanges the two sides, to read the change in the other direction.
- **Inline**: One column with removed and added lines in order, the view git diff shows; better on a phone.

## Tips

- **Compare paragraphs, not pages**: If a whole document was re-wrapped so every line break moved, put each paragraph on one line first; the diff then shows real edits.
- **Format code first**: Run JSON, HTML or CSS through a formatter on both sides so both use the same layout, then compare.
- **Sort lists before comparing**: For two lists where order doesn't matter, sort both with the Line Sorter first, then only real additions and removals show.
- **Large files are fine**: Files with tens of thousands of lines compare in a moment, because identical beginnings and endings are matched first.

## Questions

### How do I compare two Word documents or PDFs?

Copy the text out of each document and paste it into the two boxes. Formatting such as bold or fonts isn't compared, only the words.

### Can I compare two files?

Yes. Press Open file on each side to load a text file, such as .txt, .md, .csv, .json, .html, .js or .py. The files are read on your device.

### Why is a whole paragraph marked as changed?

A paragraph is one long line, so any edit inside it marks the line. Look at the highlighted words to see exactly what changed.

### Does it show moved lines?

A moved line appears as removed in one place and added in the other, as in Git.

### What does the similarity percentage mean?

Matching lines counted twice (once in each text), divided by the total number of lines in both. Two texts that share 3 of 4 lines each are 75% the same.

### Can I ignore changes in spacing or capital letters?

Yes. Tick Ignore spaces to treat runs of spaces as one and ignore spaces at the ends of lines, and Ignore case to treat capital and small letters the same.

### Is my text uploaded?

No. Everything runs in your browser; what you type, paste or open never leaves your device and nothing is stored on a server.

## Related

- [Line Sorter & Duplicate Remover](https://cromagnon.app/tools/line-sorter)
- [Word Counter](https://cromagnon.app/tools/word-counter)
- [JSON Formatter](https://cromagnon.app/tools/json-formatter)
- [Markdown Preview](https://cromagnon.app/tools/markdown-preview)
- [All tools](https://cromagnon.app/tools)
