Utilia

Text Diff Checker

Compare two texts and see every difference side by side or inline, by line, word or character. Private diff checker that runs in your browser.

How to compare two texts

  1. Paste the first version into Original text and the second version into Changed text.
  2. Choose how to Compare by: Lines, Words or Characters.
  3. Choose the View: Side by side or Inline.
  4. Tick Ignore case or Ignore whitespace differences if those changes don’t matter to you.
  5. Click Compare. After the first comparison, the result updates automatically as you edit either text.

The summary above the result counts what was added, removed and left unchanged, in lines, words or characters depending on your choice. Swap texts exchanges the two versions, which reverses additions and deletions.

Reading the result

Removed text is highlighted in red and belongs to the original. Added text is highlighted in green and belongs to the changed version. Everything else is identical in both texts.

  • Side by side with Lines shows the two versions in two columns with line numbers. Unchanged lines face each other; a modified line is shown next to its new version, and the exact words that changed inside that line are highlighted more strongly. Lines that only exist on one side leave an empty cell on the other.
  • Inline with Lines shows a single list, like a code review: removed lines are marked with a minus sign, added lines with a plus sign, and each line keeps its old and new line numbers.
  • With Words or Characters, Side by side shows the original with its deletions next to the new text with its additions, while Inline merges both into one text, with deleted words struck through.

Which comparison mode to choose

Lines is best for code, lists, configuration files, CSV data and any text where each line is a unit. It is also the fastest mode for long documents.

Words is best for prose: contracts, articles, essays, translations or emails, where a paragraph may be one long line and you want to see which words were rewritten.

Characters finds the smallest changes, such as a typo, a missing accent, a changed digit in a reference number or a swapped punctuation mark.

Ignore whitespace differences treats “a b” and “a b” as equal and ignores spaces at the start and end of lines, which is handy when the indentation or line wrapping has changed. It applies to lines and words. Ignore case treats uppercase and lowercase letters as the same.

Exporting the changes

When the texts differ, Copy as unified diff copies the changes in the standard unified diff format used by Git and patch tools, and Download .diff saves them as a file. Developers can apply that file with git apply or patch, and it’s a compact way to share a list of edits.

Frequently asked questions

Is this diff checker private?

Yes. The comparison engine is loaded into your page and the texts are compared locally in your browser. Nothing you paste is uploaded, which makes the tool safe for contracts, source code or personal documents.

Why does a small edit show a whole line as changed?

In Lines mode, a line is the unit of comparison, so any change inside it marks the whole line as modified. The side-by-side view still highlights the changed words inside the line. Switch to Words or Characters for a finer result.

Can it compare Word or PDF files?

Not directly. Copy the text out of each document and paste it into the two boxes. For PDFs, you may want to clean the copied text first so that line breaks don’t create false differences.

How large can the texts be?

Tens of thousands of lines work well in Lines mode. Very long texts that are almost completely different can take too long to compare; in that case the tool stops after a few seconds and asks you to compare by lines or to split the text.

What does the "unchanged" count mean?

It is the number of lines, words or characters that are identical in both versions, according to the comparison mode and the options you selected.