OnlineDiff Checker

Diff Checker

Free online tool for code, files, JSON, XML, and text. Nothing leaves this tab.

0 lines · 0 chars
0 lines · 0 chars

Stays on this device

The files you load are read with the browser’s File API. Find the difference stays on this device — nothing is posted.

No account. No cloud copy.

Runs in this tab

Large pastes stay smooth. The comparison never leaves this tab.

− const tax = 0.08;
+ const tax = 0.0875;
price(cents)

The exact token, not the whole line

Changed lines get a second pass at word or character grain. A flipped digit in a key does not hide inside a 120-character row.

Three steps. No wait.

  1. 01

    Original on the left

    Paste, type, or load a file. Anything textual.

  2. 02

    Changed on the right

    Paste, type, or load the new version. Swap if you got the sides backwards.

  3. 03

    Find the difference

    Click Find the difference. The two boxes themselves mark what changed. Nothing is uploaded.

A free online diff checker that stays in the tab

This page is a free diff checker. Paste the original on the left, the changed version on the right, and click Find the difference. 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 adiff 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.

If you searched for a diff checker, you probably needed one of four things: two source files, two configs, two JSON or XML payloads, or two stretches of prose. The boxes at the top of this page do all four as text. They do not decode PDFs, Word documents, or spreadsheets. They do not parse a language. They show you which characters, words, and lines moved.

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 diff and XML diff checker

JSON and XML are text until you decide they are trees. This JSON diff checkerand XML diff checker compare the characters you paste. Key order in JSON is a difference. A pretty-printed document next to a minified one is almost all difference. Extra whitespace in XML is a difference unless Ignore whitespace is on.

Pretty-print both sides with the same indent first if you only care about values. Sort object keys if order is not meaningful in your payload. There is no schema-awareJSON diff in this version, and no XML canonicalization. If you need those, use a structure-aware tool. If you need to see exactly what a client sent versus what you stored, a textual JSON diff is the honest answer.

The same advice applies to YAML, TOML, and other configs that look like data but travel as bytes. Format both sides the same way, then compare. The highlight will then track values, not wrapping.

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 Find the difference.

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. That pairing is a heuristic. Replacing a twelve-line function with a different twelve-line function can yield twelve “modifies” that have nothing to do with each other. Read the names; do not trust the yellow.

The work runs in a Web Worker so a large paste does not freeze the tab. Copy a unified patch or download a .diff when you want something for a ticket. Optional history lives in localStorage on this device. Clear it from the History panel. Color scheme is stored separately if you switch away from dark. See privacy for what the server can and cannot see.

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. That is the whole product: a diff checker for code, JSON, XML, text, and strings, running where the text already is.

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 a free online diff checker: paste Original on the left, Changed on the right, then click Find the difference.

How do I compare two files online?

Use Load file under each pane, then click Find the difference. The browser reads the files on this device. Nothing is uploaded. That works for code, JSON, XML, configs, and other text files — not PDFs, Word, or Excel.

How do I compare two texts?

Paste the original on the left and the new version on the right, then click Find the difference. 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 Find the difference. 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?

Paste or load both JSON documents. Pretty-print them with the same indent if one is minified, then click Find the difference. This is a text diff: key order still counts as a change. The same steps work for XML.

Is this a free online diff checker?

Yes. No account, no paywall, and no upload. Code, JSON, XML, and text use the same tool.

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.