Skip to content

Diff Checker

Compare two texts line by line and see exactly what was added, removed, or unchanged — in your browser.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Paste the original text into the left "Original" box.
  2. 2.Paste the new version into the right "Changed" box.
  3. 3.Read the line-by-line result below: lines marked with + were added, lines marked with - were removed, and the summary shows the total added, removed, and unchanged counts.

About Diff Checker

A diff checker (short for "difference") compares two versions of a text and highlights what changed between them. Paste the original on the left and the changed version on the right, and this tool shows you a line-by-line breakdown: which lines were added, which were removed, and which stayed the same — with a running count of each.

Under the hood it uses the Longest Common Subsequence (LCS) algorithm, the same classic dynamic-programming technique that underpins the Unix diff utility and the comparison views in Git, GitHub, and GitLab. LCS finds the longest sequence of lines that appears in both versions in the same order; everything outside that shared backbone is reported as an addition (in the changed text) or a deletion (from the original). The practical payoff is that when you edit one line in the middle of a long document, the tool marks just that one line as changed instead of flagging every line after it as different — the alignment stays anchored to the lines that really match.

This is a line-level diff, not a character-level one. It compares whole lines, which is exactly what you want for source code, configuration files, logs, JSON, CSV, prose paragraphs, and Markdown — anywhere the meaningful unit of change is a line. If two lines differ by even one character, the old line shows as removed and the new line as added, so you can see both side by side and spot the edit.

Typical uses: code review before committing, checking what a teammate changed in a config file, comparing two drafts of an article or contract, verifying that a copy-paste didn't silently drop lines, confirming two exported files are identical, or auditing the difference between a template and a filled-in version. Because changes are marked with a leading + and - as well as color, the output stays readable even for color-blind users and when pasted into plain-text notes.

Everything runs client-side. The two texts you paste are compared entirely in your browser using JavaScript — nothing is uploaded to any server. That makes it safe for sensitive material like private source code, internal configs, unpublished writing, or confidential documents, unlike online diff tools that POST your content to a backend. Close the tab and the data is gone.

The comparison is instant and updates as you type, so you can tweak either side and watch the diff recompute in real time. For very large inputs (many thousands of lines) the LCS comparison needs proportionally more memory, but for everyday files, code, and documents it is effectively immediate.

Methodology & sources

Line-level diff computed via the Longest Common Subsequence (LCS) dynamic-programming algorithm.

Frequently asked questions

How does the diff checker decide what changed?
It uses the Longest Common Subsequence (LCS) algorithm — the same approach behind Unix diff and Git — to find the longest run of lines shared by both texts in the same order. Anything outside that shared backbone is reported as an added or removed line, so a single edit in the middle of a long document is flagged as just that one line rather than everything after it.
Is this a line-by-line or character-by-character comparison?
It compares whole lines. That is the right granularity for code, config files, logs, JSON, and prose. If two lines differ by even one character, the old line is shown as removed and the new one as added, so you can see both and locate the exact edit.
Is my text uploaded anywhere?
No. Both texts are compared entirely in your browser with JavaScript, so nothing is sent to a server. It is safe to compare private source code, internal configuration, unpublished drafts, or confidential documents — close the tab and the data is gone.

Developer Tools guides

View all