Compare Two Texts Line by Line
Paste an original text and a changed version, then compare them to see exactly which lines were added, removed, or left untouched. Added lines are highlighted in green, removed lines in red. Everything runs in your browser — nothing is sent to a server.
🧩 Great For
- Spotting what changed between two drafts of a document
- Comparing two config files or environment variable lists
- Checking which lines an edit actually touched before pasting it back
- Diffing two log excerpts or API responses side by side
📋 How to Use
- Paste the original text into the first box
- Paste the version you want to compare into the second box
- Press "Compare" to highlight added and removed lines
- Press "Copy result" to copy the diff as plain text
Frequently Asked Questions
Is my text sent to a server?
No. The comparison runs entirely in your browser with plain JavaScript — your text is never uploaded, saved, or sent anywhere.
How are lines compared?
Line by line, using an exact match. Two lines count as identical only if every character matches, including spaces and tabs, so indentation changes show up as a difference.
Can it handle large texts?
Yes, for typical documents and files. Comparing very large inputs takes longer because the work grows with the number of lines on both sides, so above about 3,000 lines total you'll see a notice that the comparison may take a moment.
Does it show word-level differences within a line?
Not yet. A line that changed appears as one removed line and one added line, so you can read the old and new versions right next to each other.