Text Diff
AboutUnified-diff patch
# Both texts are identical — no patch to generate.
Apply this patch with git apply text.patch or patch -p1 < text.patch. It's a standard unified diff so it pastes cleanly into a GitHub PR review or any text-diff viewer.
Notes
How it works
- Lines compares whole lines — best for code and structured text.
- Words compares word-by-word — best for prose where small edits in long sentences matter.
- Chars compares character-by-character — useful for hunting tiny edits, formatting changes, or whitespace.
The patch
- The downloadable patch is a unified diff — the same format git diff produces. Apply it anywhere with git apply text.patch or patch -p1 < text.patch.
- Paste the copied patch into a GitHub PR review or a Slack code block to share an edit suggestion.
- The patch is always line-based regardless of the on-screen granularity — unified diffs are line-oriented by design, so word/char patches don't have a meaningful representation.
Privacy
- Both texts stay in your browser — the diff and the patch are computed locally. There's no upload, no server log, nothing to redact later.
Performance note: very large texts (≥ 5 MB combined) will run the diff on the main thread and may pause the UI for a beat. For full-codebase comparisons, prefer your editor's built-in diff.
Frequently asked questions
How do I compare two pieces of text?
Paste your original text on the left and the changed text on the right. The differences highlight instantly — additions in green, deletions in red — and you can switch between a side-by-side and a unified (single-column) view.
Can I compare line by line, word by word, or character by character?
Yes. Switch the granularity between line, word and character level. Word and character modes add intra-line highlighting so you see exactly which words changed inside an edited line, like a GitHub pull-request review.
Can I export the differences as a patch file?
Yes. The tool generates a git-compatible unified-diff patch you can copy or download as a .patch file — ready to apply with git apply or patch -p1.
Is the diff checker free, and is my text uploaded?
It is free with no signup, and nothing is uploaded — the comparison runs entirely in your browser, so even sensitive or confidential text never leaves your device.
Is there a size limit on the text I can compare?
There is no hard limit and the diff engine handles large inputs (100 KB+) in a few milliseconds. Extremely large pastes may slow down the browser, but typical documents and code files are instant.