Compare

Compare two files

Side-by-side diff with word-level highlighting and editable panes. Nothing is uploaded, so it works on a locked-down machine where handing source code to a website is not an option.

Both documents stay on your device. No upload, no account, no stored comparison.
Pasted textPasted text+0−0
Paste or open two documents

Comparing two versions of a file is the fastest way to answer "what actually changed" — a configuration that worked yesterday and does not today, a colleague's edit to a contract, two API responses that should be identical but are not. This tool puts them side by side, aligns matching lines, and highlights the differing words within changed lines rather than just flagging the whole line.

Both panes remain editable. You can fix the problem in place as you spot it and watch the highlighting update, which is how a desktop comparison tool behaves and how most web-based diff checkers do not.

How it works

How to compare two files

  1. 1

    Load both sides

    Paste directly into either pane, or use Open left file and Open right file to load from disk. Files are read locally through the browser's file input — they are not uploaded.

  2. 2

    Read the differences

    Changed regions are highlighted and connected across the gutter. Collapse unchanged regions to hide identical stretches, which makes a small change in a large file obvious.

  3. 3

    Edit in place

    Type into either pane to resolve the difference. Use Swap to reverse the sides when you loaded them in the wrong order.

Why the privacy model matters here

Diff tools receive unusually sensitive input. People paste production configuration, proprietary source, contract drafts and log extracts into them. It is worth reading the terms of whichever one you use.

The most popular online diff service processes comparisons server-side on its web tier, and its privacy policy reserves the right to "use, process, and reproduce data that you upload" and to "compile, aggregate, combine with other information, conduct data analytics" on it. Its separate desktop application promises the opposite. That gap is not an accident — it reflects a genuine architectural difference between processing on a server and processing on your machine.

This tool has no server-side component to send anything to. Load the page, disconnect from the network, and the comparison still works.

Comparing structured data

A plain text diff of two JSON or XML documents is often unhelpful, because a formatting difference swamps the real change. Format both sides first, then compare — theJSON formatter, XML formatterand YAML formatter all produce deterministic output, so two documents with identical content will produce byte-identical formatted text.

For JSON specifically, sorting object keys before comparing removes another whole class of false positive, since key order carries no meaning in JSON but does change the text. The JSON formatter has a "Sort keys" toggle for exactly this.

When to use a desktop tool instead

A browser tab is the wrong place for some jobs, and it is more useful to say so than to pretend otherwise. Reach for a desktop application such as Beyond Compare or Meld when you need three-way merge with an ancestor revision, when you want to compare files over FTP, SFTP or S3, when you need to be invoked by git difftool, or when the files run to hundreds of megabytes.

What a browser does well is the common case: two files, right now, on a machine where you cannot install anything and cannot upload anything.

Common questions

File compare FAQ

Are my files uploaded?

No. Both documents are read and compared entirely in your browser. There is no server-side component, so there is nothing to transmit, store or log. Check the Network tab in your developer tools if you would like to confirm it.

Can I edit while comparing?

Yes, both panes are fully editable and the highlighting updates as you type. Use Recount to refresh the added and removed line totals.

What is the size limit?

Ten megabytes per side. Past that the diff computation becomes slow enough that a native tool is genuinely the better choice, and saying so is more useful than letting the tab freeze.

Does it do three-way merge?

Not currently. This is a two-way comparison. Three-way merge with a common ancestor is the main thing desktop tools still do better.

Can I compare entire folders?

Yes — the folder comparison tool walks two directory trees, compares by size, timestamp and content hash, and detects renamed files. It needs Chrome or Edge for full functionality.