Text Diff
Compare two texts side by side or as a unified diff, by line, word or character — with change stats, ignore case/whitespace options and patch export.
Original (A)
Changed (B)
Differences
Paste or load text on both sides to see the differences.
How to compare two texts
- Paste the original into the left box and the changed version into the right box — or drop a
.txt,.md,.jsonor source file onto either one. - Pick the granularity: line for code and config files, word for prose, character for short strings; add ignore whitespace or ignore case if those differences don’t matter.
- Read the result side by side or as a unified diff, then copy it or export a
.patchfile you can apply withgit apply.
FAQ
Are my files uploaded anywhere?
No. The comparison runs entirely in your browser with the jsdiff library — the text never leaves your device, which makes this safe for private code and documents.
What is the difference between line, word and character mode?
Line mode marks whole lines as added or removed and is what Git shows. Word and character mode additionally highlight what changed inside a modified line, which is much easier to read for prose or for a renamed variable.
Can I apply the exported patch?
Yes. The export is a standard unified diff with three lines of context, so git apply changes.patch or patch -p1 < changes.patch will work once you rename the a/ and b/ paths to your real file.