A diff checker for the text you probably shouldn't paste into a diff checker
Config files, contracts, API responses with tokens in them: the things I most often need to compare are the things I least want to upload. My free diff checker compares two texts by line, word or character, in a split or unified view, ignores case or whitespace when you ask and copies a real unified patch you can apply with git. It all runs in your browser.
Here's a list of things I've needed to diff in the last month: two .env files, two versions of a Kubernetes manifest, an API response before and after a deploy and a freelance contract where someone "only fixed a typo". Every one of those had something in it I didn't want sitting on a stranger's server.
So I built a diff checker that never sends your text anywhere.
How do the popular diff checkers compare?
| Tool | Good for | Watch out for | Honest assessment |
|---|---|---|---|
| Diffchecker | Text, images, PDFs and spreadsheets, saved shareable diffs | Saving a diff to share puts it on their servers; the best bits are in the paid plan | The big one. Great when you need to diff a PDF. |
| Text-compare style sites | Quick one-off comparisons | Ads, and you have to trust how they handle your text | They work. That's about all I can say. |
git diff / diff -u | Files already on disk | You need the files on disk, and a terminal | The real thing. My tool's patch output speaks its language. |
| VS Code compare / Meld | Comparing files in a project | Setup, and not great for two snippets from Slack | Brilliant inside a project. Overkill for two paragraphs. |
| Sidd's diff checker | Private, fast comparison of pasted text and code | Text only: no images, PDFs or file upload | The one I trust with an .env file. |
What should a good diff checker do?
- Show changes at the right zoom level. Lines for code, words for prose, characters for that one comma.
- Split and unified views. Side by side for reading, unified for anything that looks like a pull request.
- Ignore noise. Trailing spaces and changed capitalisation shouldn't drown out real changes.
- Export something useful. A patch you can actually apply, not a screenshot.
- Keep your text on your machine.
-
Make you create an account to see a diff.
How does it work?
Paste the original on the left and the changed version on the right. The diff updates as you type.
flowchart LR
A[Original text] --> C{Compare by}
B[Modified text] --> C
C -- Lines --> D[Split or unified table with line numbers]
C -- Words --> E[Inline highlights]
C -- Characters --> E
D --> F[Copy as unified patch]Lines, words or characters?
- Lines is the classic code diff: line numbers on both sides, removed lines in red, added in green. In the split view, each run of removed lines sits beside the lines that replaced it, so a rewritten block reads as "this became that".
- Words shows changes inline, which is what you want for prose, docs and contracts. Removed words are struck through and added words are highlighted.
- Characters is for the truly cursed bugs: a missing comma, a curly quote that snuck in,
lvs1.
Ignoring whitespace and case
Two toggles on the toolbar. Ignore case works in every mode. Ignore whitespace works in line mode, so re-indented code or trailing spaces stop showing up as changes.
The patch
Copy patch gives you a standard unified diff, the same format git diff produces:
===================================================================
--- original
+++ modified
@@ -1,7 +1,7 @@
-function total(items) {
+function total(items, taxRate = 0) {
let sum = 0
for (const item of items) {
- sum += item.price
+ sum += item.price * item.quantity
}
- return sum
+ return sum * (1 + taxRate)
}
\ No newline at end of file
Save it as a file and apply it with git apply or patch, or drop it in a PR comment so the reviewer sees exactly what changed.
Plus the small stuff: a Swap button to flip the two sides, added and removed counters, line counts on each pane and a status bar that says "No differences" when the two texts really are identical (useful for proving to a colleague that the file didn't change).
Is my text private?
Yes. The comparison runs in your browser using the open-source jsdiff library. There's no server step, no saved diffs, no account. Close the tab and it's gone.
FAQ
What is the best free online diff checker?
For private comparisons of text and code, one that runs in the browser and offers line, word and character modes. My diff checker does that with no sign-up. For PDFs, images or spreadsheets, Diffchecker has the widest format support.
How do I compare two text files online?
Open each file, paste the contents into the left and right panes of the diff checker and pick lines, words or characters.
Is it safe to compare code online?
It is if the tool runs locally in your browser. Mine does: no request is made when you paste. Avoid tools that save your diff to a shareable link unless you're fine with it being stored.
How do I ignore whitespace when comparing text?
Turn on Ignore whitespace in line mode. Changes that are only spacing or indentation stop being highlighted.
Can I get a git patch from two pieces of text?
Yes. Click Copy patch to get a unified diff, then apply it with git apply or patch.
What's the difference between split and unified view?
Split shows the original and modified text side by side. Unified shows one column with removed lines (−) above added lines (+), like a pull request.
Want to try it?
Open the diff checker. It loads with a small before-and-after function so you can poke at the modes straight away. If you're comparing JSON, run both sides through the JSON formatter with Sort keys on first, and the diff gets much less noisy. More free tools are waiting next door.
Want a mode I haven't built? Email siddhant06137@gmail.com or reach me on X as @creatorsidd. Need a custom tool for your team? Book a 15-minute call.