CalcOak

Text Diff Checker: compare two versions of a text and see exactly what changed

removedaddedNothing you paste leaves your browser.

How to use the diff checker

Paste the older version into the Original box and the newer one into Changed. The comparison runs as you type, so there is no button to press: the panel below the options shows every line that was added, removed or edited, and the summary line above it counts them and gives a similarity percentage. For an edited line, the tool goes one step further and marks the individual words that differ, so a sentence where only "Fridays" became "Thursdays" shows that one word in red on the left and green on the right rather than two whole lines.

Pick Side by side when you want to read two versions of a paragraph next to each other, or Inline when the screen is narrow or you are comparing code and prefer the familiar minus and plus markers. Switch the highlighting to Characters for short strings such as a licence key or a URL, where a single changed digit is what you are hunting for. The ignore options let you skip differences that do not matter to you, such as capitalisation, indentation or double spacing. Swap exchanges the two texts, Copy unified diff puts a standard patch on the clipboard, and Download saves the same thing as a .diff file.

Why compare text this way

Reading two drafts of a contract, a 400-line configuration file or a colleague's rewrite of your documentation line by line is slow and unreliable; a changed date or a dropped "not" is easy to miss. A proper diff removes the guesswork. It uses the same Myers algorithm that Git relies on, so it finds the shortest sensible explanation of the changes instead of flagging everything after the first inserted line, and it copes with a 5,000-line file in well under a second on a normal laptop.

Everything happens in your browser. The texts are never uploaded, which matters when you are comparing salary spreadsheets exported as CSV, legal wording or unreleased source code. The exported unified diff follows the format expected by patch and git apply, so the comparison you check on screen can be handed to a developer or attached to a ticket without any reformatting.

Frequently asked questions

How does the tool decide which lines have changed?+

It runs the Myers diff algorithm on the lines of both texts, the same approach used by Git and the Unix diff command, to find the smallest set of removed and added lines that turns the original into the changed version. When a removed line sits next to an added one, the pair is treated as a single edited line and compared again word by word so only the words that differ are highlighted.

What is the difference between the side-by-side and inline views?+

Side by side shows the original on the left and the changed text on the right with the line numbers of each, which makes it easy to read a rewritten paragraph as two versions. The inline view stacks everything in one column with a minus sign for removed lines and a plus sign for added lines, which suits code and narrow phone screens.

When should I switch to character-level comparison?+

Use it for short strings such as URLs, product codes, hashes or single sentences where a change of one letter matters. Word-level comparison treats "colour" and "color" as two different words and marks the whole word, whereas character level shows only the missing "u". On long texts word level is easier to read.

What do the ignore options actually ignore?+

Ignore case treats "Invoice" and "invoice" as the same line. Ignore whitespace trims spaces and tabs at the start and end of every line, so re-indented code is not reported as changed. Ignore blank lines drops empty lines from both texts before comparing, which is useful when one version has double spacing.

Can I use the copied diff with patch or Git?+

Yes. The copy and download buttons produce a standard unified diff with three lines of context and "@@ -start,count +start,count @@" hunk headers. Save it as a .diff or .patch file and apply it with "patch -p0 < file.diff" or "git apply file.diff", provided the ignore options are switched off so line numbers match the real file.