What a text diff checker does
A text diff checker compares two texts and shows what changed. You paste an original and a changed version. The tool marks removed text, added text and edited lines. Use it for drafts, contracts, configuration files, logs, translations and any two versions of the same text.
How to compare two texts in three steps
- Paste the original text in the Original box and the changed text in the Changed box. You can also drop a text file on a box.
- Pick Lines, Words or Characters. The result updates as you type.
- Read the result. Press n for the next change and p for the previous one.
A worked example
Paste "The lease runs for 12 months." on the left and "The lease runs for 24 months, with an option to renew." on the right. Pick Words. The tool strikes out 12 and underlines 24. It also underlines the new clause after "months". The summary reads 2 changes, 6 words added and 1 removed, with a similarity of 59 percent. Click "Copy redline" and paste the result into an email. In our tests in Chrome the colors and marks came across. Check how your own app shows them before you send it.
Lines, words or characters?
| Mode | Best for | What it marks |
|---|---|---|
| Lines | Code, logs, configs, lists | Changed lines, and the changed words inside them |
| Words | Drafts, essays, contracts | Added and removed words |
| Characters | Names, codes, one odd symbol | Single characters. An emoji stays whole. |
If your lines are long, the tool suggests Words mode. A paragraph that someone re-wrapped shows up as a changed line in Lines mode. In Words mode, turn on "Ignore amount of whitespace" and the new line breaks no longer count.
Options that remove noise
Most differences you do not care about are small. The options hide them. The original text always stays on screen. The tool only skips these differences when it compares.
- Ignore case: "Hello" and "hello" are equal.
- Whitespace: ignore spaces at the start and end of lines, ignore the amount of whitespace, or ignore all of it.
- Ignore blank lines: empty lines do not count.
- Line endings: Windows (CRLF), Unix (LF) and old Mac (CR) endings are equal. This is on by default.
- Clean characters: treat smart quotes as plain quotes, treat special spaces as spaces, and ignore zero-width characters.
Why two texts that look the same are different
Some characters look alike and still differ. Turn on "Show hidden characters" to see them. Then click a change of one to three characters. A small card shows each character with its code.
| Culprit | Code | What happens |
|---|---|---|
| Non-breaking space | U+00A0 | Looks like a space. Often comes from Word or a web page. |
| Zero-width space | U+200B | Takes no room on screen. Breaks exact matches. |
| Smart quotes | U+201C, U+201D | Curly quotes replace straight quotes. |
| Long dash | U+2013, U+2014 | Replaces a plain hyphen. |
| Accent stored in two parts | U+0065 U+0301 | Looks like é but is e plus an accent mark. |
| Tab or CRLF | U+0009, CR LF | Spaces and tabs look alike. Windows adds a CR to each line. |
Read the result: split, unified or inline
Split puts the two texts side by side, row by row. Unified shows one column, with a minus sign for removed lines and a plus sign for added lines. Inline shows one flowing text with deleted words struck through and added words underlined. Use "Copy redline" to paste the inline result into Word, Google Docs or an email. The colors come with it.
Large texts
The comparing runs in a background thread, so the page stays responsive while it works. In our tests a text of 100,000 lines (about 4 MB) with 1,000 changed lines compared in under a second. Text above 400,000 characters stays in memory, and the box then shows a read-only preview of the first lines. Paste or open a file to replace it. When two large texts are almost completely different, the tool switches to an approximate method. It then shows a note. Every change it shows is real, but the list may not be the shortest possible.
Privacy
The comparing happens in your browser. The tool does not send your text to a server. You can check this yourself. Open your browser's developer tools, go to the Network tab, paste two texts and watch. No request carries your text. The tool remembers your options and your theme choice on your device. It does not save your texts.
What this tool does not do
It compares text only. It does not open Word files, PDFs, spreadsheets or folders. Copy the text out and paste it here. It is not a plagiarism checker. The similarity number counts shared words and nothing else. To compare two JSON files by their data, use the JSON diff tool. You can find more on our free tools page.