A free online diff checker that stays in the tab

Free diff checker for text, code, and files. Compare two sides side by side online. No upload, no account required.

This page is the text diff tool. Paste the original on the left, the changed version on the right, and click Check diff. Deletions turn rose in Original. Additions turn green in Changed. You can keep editing either box. The comparison never leaves the tab.

That is what people mean by an online diff checker or diff checker online: two texts, a shortest edit script, a readable highlight. It is also a code difference checker and a string diff checker, because those jobs are the same algorithm with a different paste. There is no account. There is no upload. Closing the tab drops the text, except for optional history stored in this browser.

Structured data, pictures, and office files have their own engines: JSON Diff,XML Diff,YAML Diff,List Diff,Image Diff,PDF Diff, and Word Diff.

How this code difference checker behaves

A code diff checker is a text diff in a monospace font. Load two files or paste two snippets. The first pass is line-oriented, the same shape git uses. Changed lines get a second pass at word grain so a flipped digit does not hide inside a 120-character row. Ignore whitespace when a formatter ran or a file crossed Windows and Unix line endings. Leave it off for Python, YAML, and Makefiles, where indentation is the change. Ignore case only when the language does not care.

It is not a syntax-aware compiler. Renaming a symbol in twenty places looks like twenty edits, not one refactor. If almost every line is marked, pretty-print both sides with the same indent and try again. For a repository, git diff on your machine is still the right tool. This page is for the snippet that is not in a repo yet, or should not be copied onto one.

JSON, XML, and YAML

JSON and XML are text until you decide they are trees. Paste them here and key order still counts. Open JSON Diff to sort keys and pretty-print before the comparison. XML Diff sorts attributes. YAML Diff parses the documents so quote style and indent width drop out unless you turn on Compare as text.

Text diff and string diff checker

A text diff checker is for prose, emails, translations, and anything that reflowed. Line-oriented diffs assume the line is the unit of meaning. That is true for source. It is a poor fit for a paragraph that wrapped, a sentence that swapped two clauses, or a translation that kept the same breaks. The same boxes on this page run a word pass inside each changed line — a text diff that follows tokens, not only whole rows.

A string diff checker is the same boxes with a smaller paste: two tokens, two URLs, two hashed secrets, two error messages. You do not need a special mode. Paste both sides and click Check diff.

How a comparison runs

The algorithm is Myers (1986): a shortest edit script of insertions and deletions. A highlighter that paints a line as modified is making a second decision — a deletion immediately followed by an insertion is probably an edit of the same line. We pair those, then run a word pass inside the pair.

The work runs in a Web Worker so a large paste does not freeze the tab. Optional history lives in localStorage on this device. Clear it from the History panel. Color scheme is stored separately if you switch away from light.

A free diff checker, on purpose

Most diff checker online pages either look abandoned or they ship your text to a server so they can meter a plan. This free diff checker is a static site. A page request sends the usual HTTP metadata. It does not include the contents of the editors. There is no comparison API and no account system.

Use a desktop merge tool or git merge-file when you have a common ancestor. Use this online diff checker when you need a side-by-side view now, in the browser, without sending a copy.

Frequently asked questions

What is a diff checker?

A diff checker compares two texts or files and highlights what was added, removed, or changed. This page is the text tool: paste Original on the left, Changed on the right, then click Check diff. JSON, XML, YAML, lists, images, PDFs, and Word each have their own page.

How do I compare two files online?

Use Load file under each pane, then click Check diff. The browser reads the files on this device. Nothing is uploaded. Text, code, and configs belong here. Use JSON Diff, XML Diff, YAML Diff, Image Diff, PDF Diff, or Word Diff when the format needs its own engine.

How do I compare two texts?

Paste the original on the left and the new version on the right, then click Check diff. Deletions turn rose in Original, additions green in Changed. You can keep editing either box.

How do I compare two code files?

Paste or load both files, then click Check diff. The checker compares lines, then words on changed lines. It does not parse a language, so any programming language works the same way.

How do I compare two JSON files?

Open JSON Diff. That tool pretty-prints both sides and can ignore key order. This text page still compares JSON as characters if you paste it here.

Is this a free online diff checker?

Yes. No account, no paywall, and no upload. Every tool on this site runs in the tab.

Does this online diff checker upload my text?

No. The comparison runs in your browser. Closing the tab drops the editors, except for optional history stored in this browser’s localStorage.