FreeToGenerate.com

100% free · no sign-up · nothing leaves your browser

Paste text on both sides to see the differences.

The comparison happens in your browser — nothing is sent to a server, and nothing is saved.

Also available in: Español · Português · Français · العربية

Diff Checker: Compare Two Texts and See Every Difference

Paste two versions of anything and watch every insertion, deletion, and change highlighted as you type — line by line, word by word, or character by character.

What is a diff checker?

A diff checker compares two pieces of text and shows you exactly what changed between them — what was added, what was removed, and what shifted in between. Paste an old draft and a new one, an original config and an edited copy, or two versions of the same paragraph, and it lines them up so the text difference is obvious instead of buried in a wall of near-identical lines.

This one runs entirely in your browser and updates the moment you stop typing. It can compare two texts by line, by word, or by character, ignore case or whitespace when those differences don't matter, and hand back either a highlighted side-by-side view or a copy-pasteable unified diff — everything a text compare tool needs to do, without anything leaving your machine.

How to use it

  1. Paste your two versions in. Drop the original text into the Original box on the left and the edited version into the Changed box on the right. The comparison updates live as you type — no submit button, no waiting.
  2. Pick how you want them compared. Choose Lines, Words, or Characters from the Compare by pills, and turn on Ignore case or Ignore whitespace if formatting differences shouldn't count against you.
  3. Read the result and grab what you need. The counts row totals what was added, removed, changed, and left alone. In Lines mode, use Copy as unified diff to grab a real patch, or hit Swap sides to flip which version is the baseline.

How the comparison actually works

Under the hood this uses Myers' diff algorithm — the same algorithm family git and the Unix diff command have relied on since Eugene Myers published it in 1986. The naive way to diff two texts is to build a longest-common-subsequence table sized N by M, which costs memory as well as time: two 2,000-line files would allocate four million cells before comparing a single line. Myers searches outward by edit distance instead, so the cost tracks how different the two texts are, not how long they are. Diffing 4,000 lines with exactly one line changed takes 3.3 milliseconds here.

The edit script Myers produces is minimal — no other sequence of insertions and deletions turns the first text into the second in fewer steps. That guarantee was checked rather than assumed: every string up to length four over a three-symbol alphabet was diffed against every other, 14,641 pairs in total, each one checked against a brute-force edit-distance table, plus 400 randomised pairs of longer sequences up to 40 tokens. Every script produced was minimal, rebuilt the target text exactly, and read both inputs in order.

Getting the line-level diff right is only half the job. Once a line is marked changed, it's diffed a second time, word by word, so the highlight lands on what actually moved instead of the whole line. Compare "the quick brown fox" with "the quick red fox" and only "brown" lights up on the left and "red" on the right — not four words that happen to share a line.

The three modes, and what this tool won't do

Lines mode is built for source files and prose: it splits on CRLF, LF, and bare CR line endings, so a file saved on Windows and the same file saved on macOS don't come back looking like every single line changed — the most common false positive in diff tools. When two texts are genuinely unrelated, exact alignment gets expensive fast; the search here is capped at an edit distance of 3,000 (2,500 completely different lines is already 5,000), and past that point the tool says the comparison was too large to align exactly rather than showing you a confident but wrong result.

Characters mode compares grapheme clusters, not raw code units, which matters the moment emoji show up. The family emoji reads as one character to you, but JavaScript's own .length reports 11 for it; swap it for a thumbs-up and this tool correctly reports one character removed and one added, where a tool splitting on code units would report 11 removed, 2 added, and highlight nonsense. Ignore case and Ignore whitespace, meanwhile, change only what counts as a difference — the text shown back to you is always exactly what you typed.

One more thing worth knowing before the counts row surprises you: edits here means insertions and deletions only, not substitutions — turning "kitten" into "sitting" costs 5 edits by that measure, where Levenshtein distance, which also allows substituting one character for another, would call it 3. And a few honest limits: this compares text, not files — no PDF, no Word documents, no images, no folders, so paste the text you want compared. It shows you differences; it doesn't merge them, and there's no button to pull a change from one side into the other. Nothing is uploaded and nothing is saved — reload the page and both boxes are empty, which matters more here than on most tools, since the thing people most want to diff is a contract, a config file with a password still in it, or copy that hasn't shipped yet.

Why is it free?

FreeToGenerate.com doesn't have a paid tier for this, and it isn't trying to build one. The diff runs as JavaScript in your browser tab — there's no server involved because there doesn't need to be one, no account to create, and no watermark stamped on the output for daring to use it without paying.

That matters more here than it sounds like it should. A diff checker is where people paste things they'd rather not hand to a stranger's server — draft contracts, unreleased copy, config files with a password still in them. Since nothing is transmitted anywhere, there's nothing to leak, log, or retain. Free isn't the pitch here so much as a side effect of not needing a backend at all.