Text Diff Checker
Compare two texts line by line, word by word, or character by character. Spot additions, removals, and changes with side-by-side views, merge tools, and shareable links.
On this page
What the Text Diff Checker does
The Text Diff Checker compares two pieces of text and highlights every difference between them. Additions appear in green, removals in red, and changed lines get a word-level or character-level breakdown so you can see exactly what changed inside them. Everything runs in your browser, so your text never leaves the page.
How to compare two texts
Paste the original text in the left field and the changed text in the right field. The comparison runs as you type, and the result updates automatically. You can also load files with the upload buttons next to each field, or drag a text file onto a field. The buttons above the result cover the rest: press Compare texts to refresh the comparison, Try example to load sample content, Swap to exchange both sides, or Clear to start over.
Diff modes and options
Three comparison modes cover most needs:
- Line diff: the default mode. It compares texts line by line and shows which lines were added, removed, or changed.
- Word diff: compares texts word by word, useful for prose and documents where changes happen inside sentences.
- Character diff: compares texts character by character for the finest detail, for example in config values or code strings.
Two toggles refine the comparison. Ignore whitespace changes treats text that differs only in spacing, tabs, or line endings as equal, which helps when you compare reformatted code. Ignore case compares letters without case sensitivity, so Hello and hello count as the same word. A third toggle, Word wrap, wraps long lines inside the result instead of scrolling horizontally.
Views, statistics, and navigation
The result opens in the Side by side view with line numbers on both sides. Switch to Unified for a git-style single column. The statistics line under the title reports how many lines were added, removed, and changed, plus a similarity percentage. Long unchanged sections collapse into a button showing how many lines are hidden; click it to expand just that section. The arrow buttons jump from one change to the next, which helps when you review a long document.
Copy, download, print, and share
Copy places the diff on your clipboard in unified format with – and + prefixes, ready to paste into a commit message, issue, or code review. Download saves the same text as text-diff.diff. Print opens the print dialog with a clean layout that keeps the diff colors, which is an easy way to save the comparison as a PDF. Share link encodes both texts in the URL, so the person who opens the link sees the same comparison without you sending the files. The link works for texts up to a few kilobytes; longer texts stay local.
Merging changes
Turn on Merge to resolve differences instead of only viewing them. Every changed block gets Accept and Reject buttons: accept keeps the changed version of the block, reject keeps the original. Accept all and Reject all handle everything at once. The merged result appears with its own Copy and Download buttons, and Use as original text sends it back to the left input field so you can diff the next revision against it.
Privacy and limits
All comparisons run locally in your browser. Nothing is uploaded, so it is safe for internal documents and code. Uploaded files must be plain text up to 5 MB. Very large outputs are trimmed to the first 20,000 lines with a notice. The history button keeps your last 10 comparisons in local storage, so you can restore an earlier comparison after clearing the page. Share links and history never leave your device.