Developer/Diff Checker

Diff Checker

Compare two text blocks line-by-line with an LCS-based diff algorithm.

LCS-BASEDSide-by-sideColor diffLine numbersNo upload
Saved Comparisons· Auto-save on
Original0 lines
Modified0 lines
Data Source & Legal Disclaimer
Effective: 2026
Sources: Browser-side processing (no external API)

This tool runs 100% in your browser. All computation happens locally on your device — your input is never uploaded to any server. Results are for reference only.

See all data sources & update policy →
How it worksPage 2

What a diff actually shows — illustrated

This tool aligns the two texts by finding the longest common subsequence (LCS) of lines. Lines that match stay anchored in place; a removed line that sits next to an added line is treated as a modification pair (− old next to + new); everything after a gap is flagged as purely added or removed. That anchor = context, so a one-line edit doesn't renumber everything below it.

Three verdicts, one alignment
UNCHANGED (anchors)Same line on both sides — stays putMODIFIED (paired − / +)− It was raining+ It’s sunny nowPURE ADDED / REMOVED (one side only)+ A brand-new line

Same prefix/suffix lines are matched first (anchors). In the middle, a removed-old/new-added pair is shown side-by-side as a 'modified' block. Purely inserted or deleted lines keep only one side colored.

Read the verdicts on a tiny edit

Two short blocks that share an opening line but diverge.

  1. Step 1 — anchors:The shared first line matches → both sides stay in the same row
  2. Step 2 — pairing:A removed line directly above an added one becomes one “−/+” modified pair
  3. Step 3 — one-side:Lines with no counterpart on the other side render as added or removed only
  4. Read it out loud:−old … +new means "replaced"; a lone + or − means "inserted" or "deleted"
FAQ & detailsPage 3

To compare texts: paste two versions of text into the panels — the tool highlights added, removed, and changed lines side by side, useful for code review and document comparison.

FreeToolHub Diff Checker is a free browser-based tool that compares two texts and highlights differences line by line, no signup, no upload.

About this tool

What is this tool?

Compare two blocks of text or code side by side and highlight every difference line by line. Free, no signup, files never leave your browser.

Side-by-sideColor diffLine numbersNo upload

What Is the Diff Checker?

This tool compares two blocks of text or code and highlights every difference line by line: added lines, removed lines, and changed lines marked in place, with unchanged context around each difference so you can read the changes in position. It handles plain text, configuration files, logs, JSON, CSV, and any code where line structure matters. Comparison runs entirely in your browser — neither text is uploaded, which is the difference that matters for contracts, credentials, and client files.

Who Should Use This Tool?

Reviewers comparing contract or policy revisions to confirm only the agreed changes were made. Developers comparing config versions, log outputs, or API responses where a one-character difference matters. Writers reconciling edited drafts from collaborators. QA engineers verifying before-and-after outputs. Anyone who received version 2 of a document and does not trust version 1 to still be what they agreed to.

How Does It Work?

(1) Paste the original text in the left pane and the modified text in the right. (2) The diff algorithm aligns both sides and computes the minimal set of changes between them. (3) Differences render inline: removed lines marked on the left context, added lines on the right, with unchanged lines shown for position. (4) Scan or jump difference to difference; counts of added and removed lines summarize the change size. (5) Nothing is sent anywhere — the comparison happens locally, and closing the tab clears it.

What Should You Check When Comparing Two Versions of a Document?

A visual diff is only as useful as the reading discipline behind it, and the failure mode is scanning for expected changes while unexpected ones slip past. Read every hunk, not just the ones near what you were looking for — the changes you did not anticipate are the point of running the diff. For contracts and legal documents, hunt specifically for altered numbers (rates, dates, term lengths, thresholds), shifted obligations (party names swapped inside clauses), deleted qualifiers (reasonable, commercially reasonable, material), and modified termination or liability sections — small edits there carry the biggest consequences. For code and config, watch for whitespace-only changes masking real ones, changed defaults and fallbacks, and reordered lines that alter evaluation order. Normalize before comparing when it helps: strip trailing whitespace or line-ending differences (CRLF versus LF is the classic false-positive generator between Windows and Mac files) so the diff shows meaning, not encoding. And keep the original until the modified version is accepted — a diff you cannot reproduce is not evidence.

Frequently Asked Questions

What kinds of text can I compare with this tool?

Any two text documents: config files, code before/after a refactor, contract revisions, translations, log excerpts, or two versions of an essay. Everything runs locally in your browser — nothing uploads, which makes it safe for proprietary code and confidential agreements. Paste both sides and the aligned diff view marks every insertion, deletion, and change line.

How is a word-level diff different from a line-level diff?

Line-level diffs mark whole lines changed — useless when someone rewords one phrase in a 200-character paragraph. Word-level (intra-line) diff highlights exactly which words changed inside the modified line, which is what you want for prose editing and contract redlining. This tool combines both: changed lines in the gutter, changed words highlighted within them.

Does the diff treat lines as changed when only whitespace moved?

By default whitespace differences count as changes — indentation or trailing-space edits will show. That is the safe default for code, where an invisible space can break YAML or Python. For prose comparisons where reflowed paragraphs create noise, normalize line endings and trailing spaces in your source, or mentally filter the whitespace-only rows the diff surfaces.

Is my text uploaded anywhere when I diff it?

No. The comparison algorithm runs entirely in your browser's JavaScript — neither document ever leaves your machine, and nothing persists after you close the tab. Legal drafts, unreleased code, and personal documents are as private as running diff on your own computer, because that is effectively what is happening.

How does the diff comparison work?

It uses the LCS (Longest Common Subsequence) algorithm to identify the longest sequence of lines common to both texts. Lines present in one text but not the other are marked as additions (+) or deletions (-). Unchanged lines are shown as context. The result is displayed side-by-side or inline with color highlighting: green for additions, red for deletions.

Can I compare code files or large documents?

Yes. Paste two blocks of text or code (up to 50,000 characters each). The diff checker handles all text formats including source code, configuration files, JSON, XML, and plain text documents. It ignores no content by default—every character difference is shown. Use the inline view for a unified diff or the side-by-side view for a visual comparison.

Related tools

Joke of the Day
Sep 17

Why did the fish get bad grades?

Free core, forever

Keep the Free Edition Free

No signups, no data sold. The core of every tool is free forever — the optional Pro plan adds batch processing, unlimited downloads, white-label exports and an ad-free experience.

Support me on Ko-fi— keep tools free

100% of proceeds go towards hosting & building more free tools.