How to compare two texts
- Paste the original version into the left box and the changed version into the right box.
- Click Compare to run the line-by-line diff. Swap exchanges the two boxes (and re-runs the comparison if a result is showing), and Clear empties everything.
- Review the result: removed lines are red with a − prefix, added lines are green with a + prefix, and unchanged lines are grey. Click Copy diff to copy the result as plain text.
What do the colors mean?
The checker uses the classic diff convention. A red line with a “−” exists in the original but not in the new version. A green line with a “+” only exists in the changed version. Grey lines are identical in both texts and are shown for context. The summary above the result counts added, removed and unchanged lines.
A worked example
Suppose the original is three lines: apple, banana, cherry, and the changed text is apple, blueberry, cherry, date. The result reads: apple unchanged, − banana, + blueberry, cherry unchanged, + date. The summary shows 2 added, 1 removed and 2 unchanged. Notice that an edited line always appears as a removal followed by an addition, because the tool compares whole lines and does not mark which words inside a line changed.
How the comparison behaves
- Exact matching. Lines are compared character for character. A different capital letter, an extra space at the end of a line or a tab instead of spaces makes the line count as changed, even though it looks identical on screen.
- Line endings are normalised. Windows (CRLF) and Unix (LF) line breaks are treated the same, so a file saved on a different system does not show every line as changed. A single trailing line break at the very end is ignored.
- Blank lines count. An added empty line shows up as a green line with nothing after the plus sign.
- Moved text looks like delete plus add. If a paragraph is cut from one place and pasted in another, you will see it removed in the old position and added in the new one. The tool does not detect moves.
- Size limit. After trimming identical lines from the start and end, the remaining differing region is compared with a table of size (left lines × right lines). If that exceeds nine million cells, roughly 3,000 changed lines on each side, you get a message to compare smaller sections instead.
Tips for getting a cleaner diff
- Writers and editors: long paragraphs are single lines, so one changed word marks the whole paragraph. Put each sentence on its own line before pasting and the diff will point at the sentence that changed.
- Developers: make sure both sides use the same indentation and trailing whitespace settings. Otherwise the diff is dominated by formatting noise.
- List and data comparisons: sort both lists with the sort lines tool first, so the same items line up and only real additions and removals show.
- Contract and policy reviews: paste only the clause that changed, not the whole document, to keep the output readable.
Limits of this tool
There is no word-level or character-level highlighting inside a changed line, no option to ignore case or whitespace, and no file upload; you paste text only. The copied diff lists every line with a +, − or blank prefix, which is simple to read but is not the unified patch format that tools like git apply expect.
Is it private and safe?
Yes. Toolyard compares your texts inside your browser on your own device. Nothing is ever uploaded to a server, which makes it suitable for contracts, unpublished drafts, code and other confidential text.
Related guides
Read how to compare two texts for more methods, or prepare your input with the sort lines and remove duplicate lines tools.
Frequently asked questions
How does the text comparison work?
The checker compares the two texts line by line using a longest-common-subsequence algorithm, which finds the largest set of lines that appear in both texts in the same order. Everything else is shown as removed (red) or added (green). Identical lines at the start and end are skipped first to keep it fast.
Why does a small edit mark the whole line as changed?
The comparison works on whole lines, not words. If one word inside a line differs, the old line is shown as removed and the new line as added. Splitting long paragraphs into one sentence per line makes the result much more precise.
Does it ignore case or whitespace differences?
No. Matching is exact, so a capital letter, a trailing space or a tab versus spaces makes a line count as different. Line ending style (Windows or Unix) is normalised, so that alone will not cause differences.
Can I compare code or documents?
Yes. Any plain text works: source code, config files, essays, contracts or lists. Paste both versions and click Compare. Formatted files such as Word documents must be copied out as plain text first.
What does the too-large message mean?
After removing identical lines at the start and end, the tool builds a comparison table whose size is the number of remaining lines on each side multiplied together. Above nine million cells, which is about 3,000 differing lines per side, it stops to protect your browser. Compare smaller sections instead.
What format does Copy diff produce?
Each line is copied with a plus sign, a minus sign or a space in front, followed by the line text. It is easy to paste into an email or chat, but it is not a unified diff with hunk headers, so it cannot be applied as a patch.
Is my text uploaded?
No. The comparison runs entirely in your browser. Your text is never uploaded and stays private on your device.
Is it free?
Yes, completely free with no sign-up. The only practical limit is the size of the differing region described above.