Loading tool…
About the Text Diff Checker
Paste two versions of a file, log, or paragraph to get a line-by-line diff — additions and removals highlighted, so you don’t have to eyeball two long blocks of text side by side.
How to use the Text Diff Checker
- Paste the original text on the left and the changed text on the right.
- Click Compare.
- Added lines are highlighted one color, removed lines another; unchanged lines are dimmed.
- Identical inputs report no differences.
Step-by-step walkthrough with examples and the errors people hit: How to Compare Two Texts Line by Line.
Example
Compare
"line one\nline two" vs "line one\nline TWO\nline three"→
- line two + line TWO + line three
Common errors and how to fix them
Everything is marked as changed
Line endings differ (Windows CRLF against Unix LF) or indentation was converted between tabs and spaces. Normalise one side first.
More problems and fixes in the tutorial
How the comparison works
The checker aligns the two texts line by line using a longest-common-subsequence algorithm, the same approach behind the Unix diff command and Git. Lines present only in the original are marked removed with a minus, lines present only in the changed version are marked added with a plus, and unchanged lines stay in place as context so the result reads naturally from top to bottom.
Compare two files online
Open each file in any editor, copy its contents, and paste the original on the left and the new version on the right, then press Compare. That works for source code, configuration files, SQL, CSV exports, log excerpts and plain prose. Trailing whitespace and line-ending differences show up as changes, which is often exactly the bug you are looking for; normalise them first if they are noise.
Code, configs, JSON and logs
A line diff is the right tool for configs and code, where a single changed line matters. For JSON where only the structure matters, the JSON Diff tool compares by key and ignores formatting. For two versions of a log, paste the same time window from each so the alignment is meaningful, then look for the lines that appear in only one run.
Comparing files on your own machine
When the files live on disk, your tools already have a diff: diff -u on Linux and macOS, fc and Compare-Object on Windows, Select for Compare in VS Code, git diff --no-index for any two paths, and the Compare plugin in Notepad++. The guides linked from this page walk through each one with the options that matter.
Privacy
The comparison runs entirely in your browser; neither text is uploaded, which makes the tool safe for proprietary source and internal configuration. Copy Diff gives you the plus-and-minus text for a ticket or review.
FAQ
Is this a word-level or line-level diff?
Line-level — each line is compared as a whole unit, which is the most useful granularity for logs, config, and code.
Does whitespace matter?
Yes, by default a line that differs only in trailing whitespace is shown as changed.
Is my text uploaded anywhere?
No, the comparison runs entirely in your browser.
Can I compare two files by uploading them?
Paste their contents; there is no upload step. Every modern editor can select all and copy, and nothing leaves your browser either way.
Does it highlight changed words inside a line?
No, it works at line level, which is the right granularity for code, configs and logs. A changed line is shown as one removed line and one added line.
How large a file can I compare?
Tens of thousands of lines are fine; speed depends on your device because the work happens locally. Very large files with almost nothing in common are the slowest case.
How do I compare two files in VS Code or on the Linux command line?
Follow the step-by-step guides linked from this page: the VS Code guide covers Select for Compare and the code --diff command; the Linux guide covers diff -u, side-by-side output and ignoring whitespace.