Compare Two Texts
Paste the old and new version of a contract clause, a config file or an article. Added lines show in green and removed lines in red, with line numbers from both sides.
- Free
- Runs in your browser
- Line-by-line diff
- No sign-up
How It Works
Find the changes between two versions in three steps.
Paste both versions
The original on the left, the changed text on the right.
Set what counts as a change
Ignore differences in case or extra spaces if they do not matter to you.
Read the differences
Green lines were added, red lines removed. Copy the result as a patch if you need it.
How does a text diff work?
A diff lines up two texts and finds the longest run of lines they share, in order. Whatever is left over on the left was removed and whatever is left over on the right was added. A line that was edited shows as one removed line followed by one added line, because to the comparison it is a different line. This is the same idea behind git diff and the compare views in code review tools.
The comparison is line by line. If a paragraph is one long line, any edit marks the whole paragraph as changed, so for prose it helps to put each sentence on its own line first.
Line numbers on both sides
Each row shows its number in the original and in the changed text, so you can find it in your own copy.
Ignore case
Treats "Total" and "total" as the same line.
Ignore extra spaces
Treats runs of spaces and tabs as one space and ignores spaces at line ends, useful for re-indented code.
Unified diff output
Copy as unified diff gives the --- / +++ / @@ format that patch and most code tools understand.
Convert PDF Files and File Formats
Find the perfect online tool to combine PDF files, compress documents, and handle your daily workflow effortlessly.
PDF Tools
All your PDF needs in one place
- Merge PDF
- Organize PDF
- Split PDF
- Compress PDF
- Convert to Word
- Convert to Image
Image Tools
Edit and optimize your images
- Resize Image
- Compress Image
- Convert Format
- Crop Image
- Add Watermark
- Remove Background
Word Tools
Work with Word documents
- Convert to PDF
- Merge Documents
- Split Documents
- Compress File
- Edit Text
- Add Watermark
Excel Tools
Process Excel spreadsheets
- Convert to PDF
- Convert to CSV
- Merge Sheets
- Split Sheets
- Compress File
- Clean Data
Why Use This Diff Checker
Quick comparisons without installing a diff tool.
Stays on your device
Both texts are compared in your browser. That matters for contracts, configs with secrets and unpublished drafts.
Only changed lines
Hide matching lines to see just the edits in a long document.
Swap sides
Flip original and changed with one click if you pasted them the wrong way round.
Works for code and prose
Monospaced boxes keep indentation visible, so YAML, JSON and source code compare cleanly.
Frequently Asked Questions
Questions people ask about the Text Diff Checker.
The diff works on lines. A paragraph without line breaks is one line, so any change replaces it. Split the text into sentences, one per line, to see smaller differences.
Open each file, copy its text and paste it into the two boxes. Plain-text formats such as TXT, CSV, JSON, HTML and source code work best.
Several thousand changed lines on each side work fine. Matching lines at the start and end are skipped before the comparison, so a long file with a few edits is quick. Very large texts with changes everywhere show a message asking for a smaller part.
Text in the format git diff produces, with three lines of context around each change. You can paste it into a code review, a ticket or apply it with the patch command.
Related Text & Developer Tools
More small utilities that run in your browser.
Word Counter
Count words, characters, sentences and reading time.
Sort Lines
Sort lines, remove duplicates and drop empty lines.
JSON Formatter
Format, validate and minify JSON.
Text Case Converter
Switch text to UPPER, lower, Title, camelCase and more.
Regex Tester
Test a regular expression and see every match.