# Compare Text

> Compare two texts online and see every difference highlighted side by side, line by line or word by word. Free diff checker, nothing leaves your browser.

URL: https://acrafto.com/en/compare-text-diff-checker/  
Updated: 2026-10-03

Tools are interactive browser apps; there is no public API, no endpoints to call and no server-side processing. To use a tool, open its HTML page in a browser.

Compare text online by pasting two versions next to each other: this diff checker highlights every difference while you type. Added lines are green and marked with a plus sign, removed lines are red, hatched and marked with a minus, and inside each changed line you see the exact words that differ. Use it to check what someone changed in a contract, an article, a translation, a list or a piece of code, or to make sure that two texts which should be identical really are.

## How to compare two texts online

1. Paste the original into the left field (A) and the changed version into the right field (B). You can also drop a file onto either side, or drop two files at once to fill both.
2. The comparison appears below the options and updates as you edit. **Compare** or Ctrl+Enter runs it again by hand.
3. Jump between changes with the arrow buttons or the **N** and **P** keys. The counter shows where you are, for example “Change 2 of 4”, and the narrow strip on the right edge marks where in the document the changes are.
4. **Swap sides** (key **S**) turns the comparison around. **Clear both** empties the fields, and for a few seconds you can still undo it.

Not sure what to expect? **Try an example** fills both sides with two versions of a short service agreement.

## Compare two texts side by side and highlight the differences

**Side by side** shows the two versions in two columns, with matching lines aligned and line numbers on both sides. **Unified** shows a single column with removed lines above the added ones, the way `git diff` prints changes. On a phone the tool always uses the unified view, because two narrow columns are hard to read.

How detailed the comparison is depends on **Compare by**:

- **Lines** suits code, lists and most documents. Lines that were edited rather than replaced are paired up, and the changed words inside them are highlighted. In the example, “within 14 days” against “within 10 working days” marks only “14” and “10 working”.
- **Words** shows the text as running prose, with deleted words struck through and new words underlined. This works best for articles and translations where a whole paragraph sits on one line.
- **Characters** marks every letter or digit that differs. Use it for codes and numbers: comparing the invoice numbers 20260418 and 20260481 points straight at the 1 that moved behind the 8.

Words and characters are split with the same rules your browser uses for text, so the comparison also works for languages written without spaces between words, such as Japanese or Thai.

Color is never the only signal. Every changed line also carries a plus or minus sign, removed lines are hatched, removed words are struck through and added words are underlined. The differences stay visible for people with red-green color blindness and on a black and white printout.

## Compare text online and ignore whitespace

Texts that look the same often differ in characters you cannot see. The **Ignore** options take these differences out of the comparison, much like the matching switches of [git diff](https://git-scm.com/docs/git-diff):

- **Upper and lower case** treats “Total” and “TOTAL” as the same word.
- **Spaces at the start and end of lines** hides trailing spaces and changed indentation.
- **All differences in spaces** also ignores spaces inside lines, so “price:” followed by a tab matches “price:” followed by two spaces.
- **Blank lines** skips empty lines. They stay visible, only grayed out.
- **Line endings** is on by default. Windows ends each line with two characters, CR and LF, while macOS and Linux use LF alone ([more about newlines](https://en.wikipedia.org/wiki/Newline#Representation)). Without this option, a file saved on Windows would differ from the same file saved on a Mac on every single line. The tool still tells you when the line endings differ, and with the option off it marks each extra CR.

When no difference is left, you get a clear “The texts are identical”, with a note saying whether they match character for character or only after leaving out what you chose to ignore. **Show spaces and tabs** draws a dot for every space and an arrow for every tab, which is the quickest way to find out what an invisible difference actually is.

## Find differences between two documents

The checker compares plain text. To compare Word documents or PDFs, copy the text out of each file and paste it here. Fonts, formatting and tracked changes are left out, so you see only what was rewritten. Text files such as .txt, .md, .csv, .json, .xml or source code open directly with the file button next to each field, and the file name stays visible above the column. Files saved as UTF-16 are recognized; images and other binary files are refused.

The **% match** in the summary tells you how similar the two versions are. It is the share of characters that both texts have in common, counted on both sides, so the example agreement comes out at 81.6 %. Next to it you see how many lines were added, removed and changed.

## Diff checker for code and configuration files

For source code, switch off **Wrap long lines**. Every line then stays on one row and both columns scroll together. If one version is minified JSON or another single long line, format both versions the same way first, otherwise the whole file shows up as one changed line. Values stored in Base64, for example in a configuration file, are easier to compare after decoding them with the [Base64 decoder](https://acrafto.com/en/base64-encoder-decoder/).

The comparison uses the greedy algorithm published by Eugene Myers in 1986, the same one Git uses by default. It looks for the smallest set of deleted and inserted lines, which comes down to the [longest common subsequence](https://en.wikipedia.org/wiki/Longest_common_subsequence) of the two texts. Long texts are compared in the background, so the page does not freeze, and in very long files the unchanged stretches are folded away so that you go straight to the changes.

## Export the result or share it with a link

**Export and share** gives you the result as a [unified diff](https://en.wikipedia.org/wiki/Diff#Unified_format), the format of `git diff` that `git apply` and `patch` read. You can copy it or download it as a .diff or .patch file. **Copy with highlighting** puts a colored table on the clipboard that you can paste into an email, and **Download as PNG image** saves the changes as a picture for a chat or a ticket.

**Copy share link** packs both texts and your options into the part of the address after `#`. Browsers do not send this [fragment](https://en.wikipedia.org/wiki/URI_fragment) to the server, so the texts travel only inside the link itself. Longer texts make longer links, and the tool warns you when a link may be too long for some chat apps.

## Frequently asked questions

### Are the texts I compare uploaded or stored anywhere?

No. The comparison runs in your browser and the texts are never sent to a server, so you can compare contracts, internal documents or code without worry. To keep your work after a reload, the texts are saved in your own browser's storage. Switch off **Keep my texts in this browser** on a shared computer. Keep in mind that anyone who gets a share link can read both texts.

### How do I compare two Word documents?

Word has its own comparison under Review, Compare, which also shows changes in formatting. If you only care about the wording, copy the text of each document and paste it into the two fields here. For files in Google Drive, Google Docs offers Tools, Compare documents.

### Why are lines that look the same marked as changed?

They usually differ in characters you cannot see: a trailing space, a tab instead of spaces, a non-breaking space copied from a web page or from Word, or a different line ending. Turn on **Show spaces and tabs** to see spaces and tabs. To make the tool overlook all of them, tick **All differences in spaces**, which covers non-breaking spaces too.

### Can I compare two texts for similarity or plagiarism?

You can see how similar two particular texts are: the match percentage and the highlighted passages show what was copied and what was rewritten. It is not a plagiarism checker, though. It only compares the two texts you paste and does not search the web or any other documents.

### Can I compare two lists and find the differences?

Yes, choose **Lines** under **Compare by**. Put one item on each line and the tool marks the items that are missing on either side. The comparison follows the order of the lines, so if the two lists are sorted differently, sort both the same way first. Ticking **Upper and lower case** and **Spaces at the start and end of lines** avoids false differences.

### How long can the texts be?

You can open files of up to 50 MB. While both texts together stay under about 2 million characters, the result updates as you type. Above that, the tool compares by lines only and waits for you to press **Compare**, so that typing stays smooth.

More tools for working with text are in the [Text](https://acrafto.com/en/text/) category: the [word and character counter](https://acrafto.com/en/text-word-character-counter/) counts the words, characters and norm pages of either version, and the [case converter](https://acrafto.com/en/case-converter/) makes capitalization consistent before you compare.

## Other languages

- Čeština (cs): [Porovnání textu](https://acrafto.com/cs/porovnani-textu/) ([Markdown](https://acrafto.com/cs/porovnani-textu/index.md))
- Slovenčina (sk): [Porovnanie textu online](https://acrafto.com/sk/porovnanie-textu/) ([Markdown](https://acrafto.com/sk/porovnanie-textu/index.md))
- Deutsch (de): [Texte vergleichen](https://acrafto.com/de/texte-vergleichen/) ([Markdown](https://acrafto.com/de/texte-vergleichen/index.md))
- Français (fr): [Comparer deux textes](https://acrafto.com/fr/comparer-deux-textes/) ([Markdown](https://acrafto.com/fr/comparer-deux-textes/index.md))
- Español (es): [Comparar textos online](https://acrafto.com/es/comparar-textos-online/) ([Markdown](https://acrafto.com/es/comparar-textos-online/index.md))
- Italiano (it): [Confronta testi](https://acrafto.com/it/confronta-testi-online/) ([Markdown](https://acrafto.com/it/confronta-testi-online/index.md))
- Português (pt): [Comparar textos](https://acrafto.com/pt/comparar-textos-online/) ([Markdown](https://acrafto.com/pt/comparar-textos-online/index.md))
- Nederlands (nl): [Tekst vergelijken](https://acrafto.com/nl/tekst-vergelijken/) ([Markdown](https://acrafto.com/nl/tekst-vergelijken/index.md))
- Polski (pl): [Porównanie tekstów](https://acrafto.com/pl/porownanie-tekstow-online/) ([Markdown](https://acrafto.com/pl/porownanie-tekstow-online/index.md))
- Română (ro): [Comparare texte](https://acrafto.com/ro/comparare-texte/) ([Markdown](https://acrafto.com/ro/comparare-texte/index.md))
- Magyar (hu): [Szöveg összehasonlítás](https://acrafto.com/hu/szoveg-osszehasonlitas/) ([Markdown](https://acrafto.com/hu/szoveg-osszehasonlitas/index.md))
- Ελληνικά (el): [Σύγκριση κειμένων](https://acrafto.com/el/sygkrisi-keimenon/) ([Markdown](https://acrafto.com/el/sygkrisi-keimenon/index.md))
- Български (bg): [Сравнение на текстове](https://acrafto.com/bg/sravnyavane-na-tekstove-onlayn/) ([Markdown](https://acrafto.com/bg/sravnyavane-na-tekstove-onlayn/index.md))
- Hrvatski (hr): [Usporedba teksta](https://acrafto.com/hr/usporedba-teksta/) ([Markdown](https://acrafto.com/hr/usporedba-teksta/index.md))
- Slovenščina (sl): [Primerjava besedil](https://acrafto.com/sl/primerjava-besedil/) ([Markdown](https://acrafto.com/sl/primerjava-besedil/index.md))
- Eesti (et): [Teksti võrdlemine online](https://acrafto.com/et/teksti-vordlemine/) ([Markdown](https://acrafto.com/et/teksti-vordlemine/index.md))
- Latviešu (lv): [Teksta salīdzināšana](https://acrafto.com/lv/teksta-salidzinasana/) ([Markdown](https://acrafto.com/lv/teksta-salidzinasana/index.md))
- Lietuvių (lt): [Teksto palyginimas](https://acrafto.com/lt/teksto-palyginimas/) ([Markdown](https://acrafto.com/lt/teksto-palyginimas/index.md))
- Svenska (sv): [Jämför texter](https://acrafto.com/sv/jamfor-texter/) ([Markdown](https://acrafto.com/sv/jamfor-texter/index.md))
- Dansk (da): [Sammenlign tekster](https://acrafto.com/da/sammenlign-tekster/) ([Markdown](https://acrafto.com/da/sammenlign-tekster/index.md))
- Suomi (fi): [Vertaa tekstejä](https://acrafto.com/fi/vertaa-teksteja/) ([Markdown](https://acrafto.com/fi/vertaa-teksteja/index.md))
- Norsk (no): [Sammenligne tekster](https://acrafto.com/no/sammenligne-tekster/) ([Markdown](https://acrafto.com/no/sammenligne-tekster/index.md))
- Українська (uk): [Порівняння текстів](https://acrafto.com/uk/porivniaty-teksty-onlain/) ([Markdown](https://acrafto.com/uk/porivniaty-teksty-onlain/index.md))
- Русский (ru): [Сравнить текст онлайн](https://acrafto.com/ru/sravnit-tekst-onlayn/) ([Markdown](https://acrafto.com/ru/sravnit-tekst-onlayn/index.md))
- Српски (sr): [Uporedi tekst online](https://acrafto.com/sr/uporedi-tekst/) ([Markdown](https://acrafto.com/sr/uporedi-tekst/index.md))
- Македонски (mk): [Споредба на текстови](https://acrafto.com/mk/sporedba-na-tekstovi-onlajn/) ([Markdown](https://acrafto.com/mk/sporedba-na-tekstovi-onlajn/index.md))
- Bosanski (bs): [Uporedi tekst](https://acrafto.com/bs/uporedi-tekst/) ([Markdown](https://acrafto.com/bs/uporedi-tekst/index.md))
- Shqip (sq): [Krahaso dy tekste](https://acrafto.com/sq/krahaso-tekste-online/) ([Markdown](https://acrafto.com/sq/krahaso-tekste-online/index.md))
- Türkçe (tr): [Metin karşılaştırma](https://acrafto.com/tr/metin-karsilastirma/) ([Markdown](https://acrafto.com/tr/metin-karsilastirma/index.md))
- 日本語 (ja): [テキスト比較ツール](https://acrafto.com/ja/tekisuto-hikaku/) ([Markdown](https://acrafto.com/ja/tekisuto-hikaku/index.md))
- 한국어 (ko): [텍스트 비교](https://acrafto.com/ko/tekseuteu-bigyo/) ([Markdown](https://acrafto.com/ko/tekseuteu-bigyo/index.md))
- العربية (ar): [مقارنة النصوص](https://acrafto.com/ar/muqaranat-al-nusus/) ([Markdown](https://acrafto.com/ar/muqaranat-al-nusus/index.md))
- हिन्दी (hi): [टेक्स्ट तुलना ऑनलाइन](https://acrafto.com/hi/text-compare-online/) ([Markdown](https://acrafto.com/hi/text-compare-online/index.md))
- Bahasa Indonesia (id): [Bandingkan teks](https://acrafto.com/id/bandingkan-teks-online/) ([Markdown](https://acrafto.com/id/bandingkan-teks-online/index.md))
- Tiếng Việt (vi): [So sánh văn bản](https://acrafto.com/vi/so-sanh-van-ban-online/) ([Markdown](https://acrafto.com/vi/so-sanh-van-ban-online/index.md))
- ไทย (th): [เปรียบเทียบข้อความ](https://acrafto.com/th/priap-thiap-khokhwam/) ([Markdown](https://acrafto.com/th/priap-thiap-khokhwam/index.md))
- עברית (he): [השוואת טקסטים](https://acrafto.com/he/hashvaat-tekstim-online/) ([Markdown](https://acrafto.com/he/hashvaat-tekstim-online/index.md))
