Text Diff: Compare Two Texts
Compare two versions of a text or code side by side and see added and removed lines, words or characters. Your text is never uploaded.
Differences
How to Use
- 01 Paste both versions Original on the left, changed version on the right.
- 02 Choose the granularity Lines for code and lists, words for prose, characters for typos and IDs.
- 03 Read the result Removed parts are red and struck through, added parts are green. Copy the result as a unified patch for code reviews.
About this tool
The diff is computed with Myers’ algorithm, the same approach used by Git, via the jsdiff library. It finds the smallest set of insertions and deletions that turns the original into the changed text.
Frequently Asked Questions
Yes. The comparison runs in your browser with the open-source jsdiff library. Nothing is sent to a server.
In line mode a single changed character marks the whole line. Switch to words or characters to see exactly what changed, or ignore whitespace if only indentation differs.