Loona Automation logoLoona Developer Tools
Home › Developer Tools › Diff Checker

Diff Checker - Compare Two Texts Line by Line

In short: the Diff Checker compares two versions of a text line by line using a longest-common-subsequence diff, highlights added lines in green and removed lines in red, and summarises how many lines were added, removed and left unchanged.

A config file changed and something broke, or two versions of a document disagree - pasting both versions here shows you exactly which lines moved, in seconds, without uploading either one anywhere.

Added lines-
Removed lines-
Unchanged lines-
(no comparison yet)
Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the Diff Checker

  1. Paste the original text into the left box.
  2. Paste the revised text into the right box.
  3. Click Compare.
  4. Read the result: lines marked - were removed, lines marked + were added, and unmarked lines are unchanged.

How it works

The checker splits both texts into lines and computes the longest common subsequence (LCS) of the two line lists - the largest set of lines that appears in the same order in both. Lines in the subsequence are unchanged; lines in the original but not in the subsequence were removed, and lines only in the revision were added. This is the same family of algorithm behind tools like Unix diff, so the comparison lines up the way you would expect even when whole blocks have moved by a line or two.

Worked example

Comparing two versions of a three-line shopping list where "eggs" became "egg whites" shows one red line and one green line, with the other two lines unchanged - a summary of 1 added, 1 removed, 2 unchanged, instead of a wall of nearly identical text to eyeball.

Frequently Asked Questions

Is this diff checker free?

Yes - completely free, with no sign-up and no daily cap.

Is the comparison line-based or character-based?

Line-based, like Unix diff: a line is either unchanged, removed or added. If one word changes inside a long line, the whole line shows as one removal plus one addition.

How large a text can it compare?

Up to 1,500 lines on each side. The LCS table grows with the product of the two line counts, so very large files are better compared with a desktop diff tool.

Does it ignore whitespace or case?

No - lines must match exactly to count as unchanged, so a line that only gained a trailing space shows as changed. That strictness is deliberate: it is usually exactly what you want when comparing configs and code.

Is my text uploaded to a server?

No. The comparison happens 100% in your browser. Neither text ever leaves your device.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.