Text Diff Checker (Compare Two Texts)
A text diff checker compares two pieces of text and shows you exactly which lines were added, removed, or left unchanged. The tool below splits both texts into lines, aligns the lines they share, and marks every difference, so you can see what moved between two versions without reading both side by side. It runs entirely in your browser, so nothing you paste is uploaded.
What a Text Diff Is
A text diff is a comparison between two versions of the same text that reports the changes from one to the other. Instead of asking you to spot differences by eye, it walks both texts line by line and labels each line as unchanged, removed, or added. This is the same idea behind the diffs in version control, code review, and document tracking: rather than describing a change in words, it points at the exact lines that differ.
How to Use It
- Paste the original text into the left box.
- Paste the changed text into the right box.
- The comparison runs as you type. There is no button to press.
- Read the result below: removed lines start with a minus, added lines start with a plus, and unchanged lines have no marker.
- Check the summary line for the count of added, removed, and unchanged lines.
How Line Diffing Works (LCS)
The tool compares texts at the line level using a longest common subsequence, or LCS. The LCS is the longest sequence of lines that appears in both texts in the same order, even if other lines sit between them. Once the tool finds that shared backbone of lines, it can hold those lines in place and treat everything else as a change. Any line in the original that is not part of the shared sequence is a removal, and any line in the changed text that is not part of it is an addition.
What the Markers Mean
| Marker | Meaning |
|---|---|
| (no marker) | Unchanged line. It appears in both the original and the changed text. |
| – (minus) | Removed line. It is in the original but not in the changed text. |
| + (plus) | Added line. It is in the changed text but not in the original. |
An edited line shows up as a removal of the old line followed by an addition of the new one, because at the line level the two are different lines. The summary at the bottom counts each category so you can see the size of the change at a glance.
Use Cases
Compare two drafts of an article or email to see exactly which sentences changed between revisions. Compare two configuration files to find the setting that differs between a working and a broken environment. Compare two snippets of code in a review to confirm what an edit actually touched. Anywhere you have a before and an after in plain text, a line diff turns guesswork into a clear list of changes.
It Runs in Your Browser
The comparison happens locally on your device. The text you paste is never sent to a server, logged, or stored, so it is safe to compare private documents, internal configuration, or unreleased code. You can confirm this by disconnecting from the internet and watching the diff still update as you type.
When to Use It
Reach for a text diff whenever two versions of something exist and you need to know precisely what changed, not just that something did. It is most useful on line-based text such as documents, config files, logs, and code, where each line is a meaningful unit. For very long inputs the tool caps the number of lines it compares so the page stays responsive; trim the text to the section you care about and the diff returns instantly.
Last Thoughts on Comparing Two Texts
Comparing texts by eye is slow and easy to get wrong. A line diff does the alignment for you, holding the shared lines in place and surfacing only what moved, so a one-line change reads as one line rather than a wall of apparent differences. That is the difference between confirming a change and hunting for it.
Paste your two versions above to see the changes between them. For related text work, see our word counter, the JSON formatter, and the whitespace remover, or browse the rest of our free online tools.
Key Takeaways:
- A text diff compares two texts line by line and marks each line as unchanged, removed, or added.
- The tool uses a longest common subsequence to keep shared lines aligned, so inserted or deleted lines are reported on their own.
- Removed lines start with a minus and added lines start with a plus; unchanged lines have no marker.
- An edited line appears as a removal of the old line plus an addition of the new one.
- The summary counts added, removed, and unchanged lines so you can size the change at a glance.
- Everything runs in your browser; the text you paste is never uploaded or stored.
Frequently Asked Questions (FAQs)
What does a text diff checker do?
It compares two pieces of text line by line and shows which lines were added, removed, or left unchanged. Instead of reading both versions side by side, you get a single marked result and a count of each type of change.
Does this tool send my text anywhere?
No. The comparison runs entirely inside your browser, and the text you paste is never transmitted, logged, or stored on any server. You can confirm this by disconnecting from the internet and watching the diff still update.
How does the line alignment work?
The tool computes a longest common subsequence of the lines, which is the longest set of lines that appears in both texts in the same order. It keeps those shared lines in place and marks everything else as added or removed, so an inserted line does not push the rest out of alignment.
Why does an edited line show as both removed and added?
The comparison works at the line level, so a changed line is a different line from the one it replaced. The tool reports the old version as removed and the new version as added, which together represent the edit.
Can I compare code or config files?
Yes. Any line-based plain text works, including code, configuration files, logs, and documents. Paste the original on the left and the changed version on the right to see exactly which lines differ.
Is there a limit on how much text I can compare?
The tool caps each text at a couple of thousand lines so the page stays responsive. If you exceed the cap, trim the input to the section you care about and the diff returns instantly.


