How to use the Text Diff Checker
- Paste the original text.
- Paste the modified text.
- Click Find Differences.
- Review or copy the unified diff output.
Example
| Input | Original lines: a, b, c · Modified lines: a, B, c |
|---|---|
| Result | a - b + B c |
Reading the unified diff
The result follows the familiar unified diff layout used by git. It starts with two header lines, “--- original” and “+++ changed”. Each group of changes is introduced by a hunk header such as “@@ -3,4 +3,5 @@”, which tells you the starting line and the number of lines in the original and in the changed text.
- Lines starting with “-” were removed or replaced.
- Lines starting with “+” were added or are the new version.
- Unmarked lines are unchanged context around the changes.
A summary above the diff shows how many lines were added and removed and how the line count changed, for example 10 → 11 lines.
Settings
- Context lines: how many unchanged lines to show around each change. Choose 0, 3, 10 or Show all.
- Ignore case and Ignore whitespace: skip differences that do not matter to you.
- Swap: reverses the two texts, which turns additions into removals.
Copy or download the diff
Use Copy diff to paste the result into a code review, ticket or email. Download .diff saves it as a file named changes.diff. If the two texts are identical, there is nothing to copy and the tool says so.
Good uses
- Checking what changed between two versions of a configuration file or script.
- Reviewing edits between two drafts of a document line by line.
- Preparing a short patch description to share with a teammate.
- Comparing exported data, such as two lists or two JSON files, before you merge them.
Other comparison tools
For a visual side-by-side view with highlighted words, use the Text Compare. To compare word by word or character by character, try the Word Difference Checker, and to compare structured data use the JSON Compare.
Frequently asked questions
What is a unified diff?
A unified diff lists lines from both versions in order: unchanged lines have no marker, removed lines start with “−” and added lines start with “+”.
Can I compare code?
Yes. Any plain text works, including source code, config files, CSV and JSON. Format JSON first for clearer results.
Is it a line-by-line comparison?
Yes. The diff compares whole lines, so any change inside a line shows that line as removed and added again. For changes inside a line, use the Text Compare or Word Difference Checker.
How do I show the entire document?
Set Context lines to “Show all”. Every line is then included in the diff, with the changes marked.