Code Diff Checker

Compare two versions of code or text side by side with added and removed lines highlighted.

Code reviewers quickly spotting what changed between two versions of a function.

How to use it

  1. Paste the original

    Add the original (before) version into the left panel.

  2. Paste the modified version

    Add the updated (after) version into the right panel.

  3. Review the diff

    Scroll through the added (green) and removed (red) lines, and download a .patch file if you need one.

Why use this tool?

When you have two versions of something — a function before and after a change, two drafts of a contract, yesterday’s config and today’s — the question is always "what actually changed?" Eyeballing two blocks of text side by side is slow and unreliable; it is easy to miss a flipped value, a deleted line, or a subtle edit buried in a wall of unchanged text. That is exactly the kind of mistake that causes bugs and misunderstandings. This tool compares the two versions and highlights precisely what was added (green) and removed (red), using the Longest Common Subsequence algorithm — the same approach Git and professional diff tools use — so the result is accurate every time. Paste the before and after into the two panels and read the differences instantly; you can also download the result as a standard .patch file. It all runs in your browser, so your code or documents never leave your device, and it works on any text, not just code.

Common use cases

Code review

Compare two versions of a function, file, or snippet to see exactly what changed before merging.

Document editing

Spot every change between two drafts of a report, contract, or policy.

Config management

Diff configuration files to find differences between dev, staging, and production.

Debugging

Compare a working and broken version of code or data to isolate what changed.

Content & translation

Check what was edited between two versions of copy, JSON, or CSV.

Frequently asked questions

Is my code sent to a server?

No. All diffing happens in your browser, so your code or documents never leave your device.

What algorithm is used?

Longest Common Subsequence (LCS) — the same core approach used by Git and most professional diff tools.

Can I diff non-code text?

Yes. Any text works — prose, JSON, CSV, configuration, or plain documents.

Is the comparison line-by-line or character-by-character?

It highlights changes at the line level, the standard way developers review diffs.

What does "Download patch" produce?

A standard unified diff (.patch) that can be applied with `git apply` or the `patch` command.

Does whitespace count as a change?

Yes — differing whitespace or indentation registers as a change, since it can be meaningful in some files.

Is there a size limit?

No fixed limit, though very large inputs take longer to compare on your device.

Is it free?

Yes — compare as many files as you like for free, with no sign-up.

Related tools