A diff shows exactly what changed between two versions of the same text. Paste the original on one side and the revised version on the other, and the tool marks the lines that were added or removed and highlights the individual words that differ inside changed lines. It is handy for comparing contract drafts, checking what an editor altered in your article, spotting a changed value between two config files, or confirming that two copies you thought were identical really are.
How to compare two texts
- Paste the older or original text into the left box and the newer text into the right box. Order matters because additions and removals are described from left to right.
- Decide whether formatting noise should count. If one version has different indentation, trailing spaces or capitalisation that you do not care about, switch on the matching ignore option.
- Read the result. Removed lines are marked on the original side, added lines on the new side, and unchanged lines stay plain.
- Look inside the changed lines. Word-level highlights show the exact phrase or value that moved, so you do not have to read two similar sentences side by side.
- Scroll through the whole result before deciding, because a small change in one place can shift the alignment of the lines below it.
Options explained
- Line view: The text is compared line by line first. A line present only in the new version counts as added, and a line present only in the original counts as removed. Lines that exist in both but differ slightly are paired up so you can see what changed inside them.
- Word highlighting: Within a changed line, individual words or fragments are highlighted. This is the quickest way to find a changed number, a swapped name or a corrected typo.
- Ignore whitespace: Treats differences in spaces, tabs and line-end padding as irrelevant. Turn it on when text has been re-indented, reflowed or pasted from different editors and you only care about the words.
- Ignore case: Treats "Report" and "report" as equal. Useful when comparing text that was converted between styles, though it will hide a deliberate capitalisation fix.
With both ignore options off, the comparison is exact, character for character. That strictness is what you want for code, hashes and legal wording.
Tips and common problems
Split paragraphs into lines for better results: A long paragraph that is a single line is flagged as entirely changed when one word differs. The word highlights still show the change, but putting each sentence on its own line makes the line view far clearer. Line tools can split and tidy text for this.
Invisible differences are real differences: Two lines that look identical may differ by a trailing space, a non-breaking space, or a different kind of quotation mark or dash. If the tool reports a change you cannot see, turn on ignore whitespace and see if it disappears.
Line endings from different systems: Text from Windows and Linux files uses different line break characters. Pasting into a text box normalises most of this, but if everything shows as changed, check that you pasted both sides the same way.
Moved paragraphs show up as a removal plus an addition: A diff has no concept of "moved". If you reordered sections, expect them to appear deleted in one place and added in another.
Compare before you overwrite: Pasting a new draft against the old one before you save over it gives you a quick safety check, and it takes seconds.
Sorted lists compare more cleanly: When two lists contain the same items in different order, sort both first, then diff them, and the real additions and omissions stand out. You can also remove repeated entries beforehand.
Your files stay on your device
Both texts are compared by code running in your browser. Nothing you paste is uploaded, stored or visible to anyone else, so you can safely compare confidential drafts, source code or private notes. No extra data is downloaded to perform the comparison. You can read more on the How it works page.
Frequently asked questions
Can I compare two files instead of pasted text?
You paste text into the boxes, so open each file in an editor, copy the contents and paste them across. This works for any plain-text format such as notes, code, CSV or JSON.
What do the colors mean?
Removed content is shown in a red tone and added content in a green tone, with stronger shading on the exact words that differ. Unchanged lines have no highlight.
Does it work for Word documents or PDFs?
Not directly, since those formats contain more than text. Copy the text from the document, or extract it from a scanned PDF with OCR, then compare the plain text.
Why does it say everything changed?
Most often the two sides differ in line endings, indentation or one is a single long line. Try ignoring whitespace, or break the text into lines and compare again.
Is there a size limit?
Each side can hold up to 5,000 lines. Comparing large texts takes memory and time because the work is done on your device, so for bigger files compare them section by section.
Can it merge changes for me?
No. It highlights differences so you can decide what to keep. You apply the edits yourself in your own editor.