# Compare two blocks of text

> Paste the original and the changed text side by side. See added, removed, and modified lines with character-level highlighting on changed lines.

Open the tool: https://yourbrowsercandoit.com/text-diff

Compare two blocks of text side by side. Free, no signup. Runs entirely in your browser; files are never uploaded.

## How it works

The tool runs a longest-common-subsequence diff at the line level, then pairs up modified lines and runs a second character-level diff inside each pair. Equal lines show in both columns. Added lines (in the right column only) are highlighted green with a + marker. Removed lines (in the left column only) are red with a - marker. Modified lines show side by side with the changed characters within each line highlighted. Stats at the top: added, removed, changed, unchanged. Useful for proof-reading edits, comparing config files, spotting what changed in a contract, or auditing a copy-paste. Pure character comparison: whitespace and case differences count as differences. Both text boxes accept any size of input (within memory limits).

## How to use it

1. **Paste the original text.** Put the before version in the left box.
2. **Paste the changed text.** Put the after version in the right box.
3. **Read the diff.** Added lines show green, removed lines red, and modified lines highlight the exact changed characters.
4. **Check the stats.** The counters at the top total the added, removed, changed, and unchanged lines.

## Frequently asked questions

### Does whitespace count as a difference?

Yes. Extra spaces, trailing whitespace, and tab vs space all show up as differences.

### Is the comparison case-sensitive?

Yes. "Hello" and "hello" diff as a change. There's no ignore-case toggle in this version.

### Can I compare two files?

Not directly. Open each file in another tool, copy its contents, paste into the two boxes.

### Is the text uploaded?

No. The diff runs entirely in your browser.

## Related tools

- [WhatsApp chat analyzer](https://yourbrowsercandoit.com/whatsapp-chat-analyzer): Your chat in shareable cards: who texts more, who replies first, top emoji and streaks.
- [Base64 encoder](https://yourbrowsercandoit.com/base64-encoder): Encode or decode Base64, including pictures and files.
- [Lorem Ipsum](https://yourbrowsercandoit.com/lorem-ipsum): Generate placeholder text.
- [Encrypt text](https://yourbrowsercandoit.com/text-encryptor): Encrypt sensitive text with a passphrase.
- [Markdown editor](https://yourbrowsercandoit.com/markdown-editor): Write and preview Markdown side by side.
- [Word counter](https://yourbrowsercandoit.com/word-counter): Count words, characters, lines, and reading time.
