Compare Text

Acrafto Team Text
Updated
Compare by
View
Ignore
Display

Paste or type two texts above. The differences show up here as you type.

Everything runs in your browser. Your texts are not uploaded anywhere, and a share link carries them in the part of the address that browsers never send to a server.

N and P jump between changes · S swaps the sides · Ctrl+Enter compares

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:

  • 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). 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.

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 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 and share gives you the result as a unified diff, 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 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 category: the word and character counter counts the words, characters and norm pages of either version, and the case converter makes capitalization consistent before you compare.

I would appreciate if you could share these pages with friends, bookmark them, or link to them. Thank you! 🙏