Text Diff
Compare two texts or files by lines, words, characters or sentences, inline or side by side, and export a .patch — all locally in your browser.
🔒 Runs entirely in your browser — nothing is uploadedCompare two versions of text locally
A visual diff makes changes easier to review than reading two drafts side by side. This tool compares an original text with a changed version and highlights what was removed and what was added. It is useful for release notes, policy edits, support macros, code snippets, translated strings, copied configuration and any situation where you need to understand what changed before accepting or sharing the new version. You can paste text or drop files such as .txt, .md, .json, .csv or source code onto either box. The comparison is generated entirely in the browser.
Four comparison modes cover different kinds of review. Line mode is best when structure matters: lists, logs, markdown and code are easier to scan when whole changed lines are colored. Word mode suits prose because it shows smaller edits inside a sentence, character mode catches single-letter typos and changed IDs, and sentence mode shows which sentences were rewritten. Options to ignore whitespace, letter case and blank lines hide noise such as re-indented code or extra empty lines, so only meaningful edits remain.
Reading the diff output
Removed text is shown with a red background, and added text is shown with a green background. The side-by-side view puts the original and the changed version in two columns with line numbers, and changed lines that face each other get a stronger highlight on the exact words or characters that differ. The inline view shows a single stream, with line numbers in line mode. Use Next and Previous, or F7 and Shift+F7, to jump from one change to the next instead of scrolling through long documents. The summary shows the number of changes, how much was added and removed, and a similarity percentage.
Review and share changes
Compare a revised email template against the approved copy, check whether a generated answer changed important wording, inspect a configuration snippet before applying it, or verify that a list cleanup only removed intended entries. When you need to hand the changes to someone else, download a unified .patch file: it uses the same format as git and can be applied with git apply or patch -p1. A diff is not a substitute for judgment, but it reduces the chance of missing small changes. Keeping the operation local also avoids creating a server-side copy of drafts that may still be confidential.
Like the rest of Text Tools, this page is designed for quick, repeatable utility work rather than account-based storage. Keep the original text nearby when the output matters, review the result, and copy only the final version you want to use.
How to use
- Add both versionsPaste the original text on the left and the changed text on the right, or drop a file onto each box. Dropping two files at once fills both sides.
- Pick mode, view and optionsCompare by lines, words, characters or sentences, choose inline or side-by-side view, and optionally ignore whitespace, case or blank lines.
- Review the changesClick compare, then use Next and Previous (or F7 and Shift+F7) to jump between changes while checking the similarity score.
- Export a patchDownload a unified .patch file of the exact changes to share or apply with git apply or patch.
Frequently asked questions
Is my text sent to a diff server?
Which comparison mode should I use?
What do the ignore options do?
How is the similarity percentage calculated?
Does the .patch file respect the ignore options?
git apply or patch -p1.