Skip to main content
C
CodeUtil

Diff Checker

Compare two text files or code snippets and see the differences highlighted.

Loading tool...

Why I Built This Diff Checker

"What changed?" - I ask myself this question about 50 times a day. Whether it's comparing config files between staging and production, reviewing someone's code changes, or figuring out why my SQL query suddenly returns different results - I need to see differences fast.

I built this tool because I got tired of copy-pasting into random diff websites that were either slow, cluttered with ads, or required sign-ups. Paste your text, see the diff. That's it.

What You Can Do Here

  • Side by side view - Both versions scroll together, changes are highlighted
  • Inline view - Unified format like you'd see in a Git commit
  • Ignore whitespace - Sometimes you just don't care about spacing changes
  • Upload files - Drag and drop instead of copy-paste
  • Export .patch - Get a proper patch file you can apply with git apply

How I Actually Use This

  • Config debugging - "Why does it work in staging but not production?" I paste both configs and instantly see the difference
  • Code review - When GitHub's diff is too cramped, I paste chunks here for a cleaner view
  • SQL comparison - Comparing query outputs to spot data discrepancies
  • Documentation updates - Seeing what actually changed in a doc revision

Pro tip: I often format JSON or XML first using the JSON Formatter or XML Formatter before diffing. Makes the comparison much cleaner.

Related Articles

Frequently Asked Questions

What algorithm does this use?

It uses the Longest Common Subsequence (LCS) algorithm - the same approach Git uses. Basically, it finds the longest parts that are the same in both texts, and everything else is marked as added or removed. It's fast and gives you the minimal set of changes.

Can I compare images or PDFs?

Nope, text only. Binary files don't make sense as text diffs. For images, you'd want a visual diff tool. For PDFs, you'd need to extract the text first.

Is there a size limit?

Everything runs in your browser, so it depends on how much RAM you have. I'd say keep it under 1MB per file for smooth performance. If you're comparing massive files, you probably want a desktop tool anyway.

What's a .patch file good for?

It's the standard format for sharing changes. You can send someone a patch file and they can apply it with git apply diff.patch or the Unix patch command. Super useful for sharing fixes without sending whole files.