# Text Compare

> Find the differences between two texts by line and by word, with options to ignore case and whitespace. Your texts stay in your browser.

Source: https://widgetpantry.com/en/text-compare · Türkçe: https://widgetpantry.com/tr/metin-karsilastirma

Put two texts side by side and see the lines added and removed, with the changed words marked: for two versions of a contract, an essay or code.

Runs in your browser: files and text are not uploaded. [Use the tool](https://widgetpantry.com/en/text-compare)

## How to use it

1. Paste the old text on the left and the new text on the right.
2. Optionally ignore differences in case and whitespace.
3. The differences update as you type: + is an added line, − a removed one; changed words are highlighted.

## How the differences are found

The tool splits both texts into lines and finds the shortest series of changes that turns one into the other (the Myers algorithm, the same one git uses). Unchanged lines are plain, removed lines are marked − on red, added lines + on green. When a line was edited, its old and new versions sit together and the words that changed are highlighted.

“Ignore whitespace” treats leading and trailing spaces and runs of spaces as one space. “Ignore case” also matches the Turkish İ/ı correctly. Line-ending differences (Windows and Mac) never count as changes.

For two very long texts that share little, the comparison stops so your browser stays responsive; split the text into parts and try again.

## Frequently asked questions

### Can I compare Word or PDF files?

This tool works on plain text. Copy the text from each document into the two boxes to see the differences; formatting such as bold or colour is not compared.

### Why does a whole line show as changed?

If even one character in a line changed, the line counts as removed and added again; the changed words are highlighted inside it. If the difference is only whitespace or case, tick the matching box.

### How long can the texts be?

Tens of thousands of lines are fine when the texts are similar. For long texts that are almost entirely different, the tool stops and says so; compare them in sections.

### Are my texts sent anywhere?

No. The comparison happens in your browser; the texts you paste are never sent to our server or stored. It is safe for confidential documents.

## Related tools

- [Word Counter](https://widgetpantry.com/en/word-counter): Instantly count the words and characters in an essay, article or application answer. Characters with and without spaces, sentences, paragraphs and estimated reading time.
- [Case Converter](https://widgetpantry.com/en/case-converter): Case converter: upper, lower, title and sentence case, plus camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE for code. Free, runs in your browser.
- [JSON Formatter](https://widgetpantry.com/en/json-formatter): Online JSON formatter and validator: pretty-print, validate and minify JSON. Line and column for errors, 2/4-space or tab indentation, one-click copy.
