ToolFactory

Line Diff Viewer

Line Diff Viewer: free, instant and private. This is the same algorithm git uses, simplified to whole lines.

How the Line Diff Viewer works

The Line Diff Viewer takes Original text, Changed text and returns the answer instantly — no button to hunt for, no page reload. This is the same algorithm git uses, simplified to whole lines. It is the fastest way to spot what actually changed between two contract drafts, two config files, or two versions of your own copy before sending.

Enter your own numbers to replace the example values; the result panel updates as you type. Everything runs in this single page, so nothing you enter leaves your device.

Formula used

longest common subsequence of the two line lists → kept, added (+), removed (−)

SymbolMeaning
LCSthe longest sequence of lines both texts share
+lines present only in the changed text
−lines present only in the original

This is the same algorithm git uses, simplified to whole lines. It is the fastest way to spot what actually changed between two contract drafts, two config files, or two versions of your own copy before sending.

Inputs used: Original text, Changed text.

Worked example

Take the default example — original text of The quick brown fox jumps over the lazy dog. The second line stays the same. The third line was here., changed text of The quick brown fox leaps over the lazy dog. The second line stays the same. A brand new third line appears.:

Frequently asked questions

What formula does the Line Diff Viewer use?
It uses longest common subsequence of the two line lists → kept, added (+), removed (−), where LCS is the the longest sequence of lines both texts share; + is the lines present only in the changed text; − is the lines present only in the original.
Is the Line Diff Viewer free?
Yes. There is no signup, no usage limit and no watermark — the checker runs entirely in your browser.
How do I read the result?
This is the same algorithm git uses, simplified to whole lines. It is the fastest way to spot what actually changed between two contract drafts, two config files, or two versions of your own copy before sending.
Does the Line Diff Viewer store or send my data?
No. Every calculation happens locally in the page, so the numbers you type are never uploaded or logged.
Does it work on a phone and offline?
Yes — the page is a single lightweight file that adapts to any screen size. Once it has loaded it keeps working without a network connection.