Text Diff Checker
Paste or upload two versions of your text and instantly see what was added, removed or changed.
What Does This Text Diff Checker Do?
This text diff checker compares two pieces of text and shows you exactly what changed between them. Paste an original version on the left and a changed version on the right, and the tool marks every added line, removed line and modified line, with a summary count at the top of the result. You can compare line by line, word by word or character by character, and you can tell it to ignore things like case, extra spaces or blank lines so that only meaningful edits show up.
Everything runs inside your browser. Your text is not sent to a server, so it is safe to use for drafts, contracts, configuration files and code that you would rather keep private.
How to Compare Two Texts Online?
- Add the original text. Paste or type it into the Original panel, or drop a text file onto the panel, or use Open file to pick one from your device.
- Add the changed text. Do the same in the Changed panel. If you loaded them in the wrong order, the Swap button flips the two sides in one click.
- Choose how to compare. Pick Lines, Words or Characters depending on how detailed you want the highlighting to be.
- Set any ignore options. Open Options to ignore whitespace, letter case, blank lines or line endings. You can leave everything off for a strict comparison.
- Read the result. The comparison updates automatically while you type. Added lines are shown in green, removed lines in red and modified lines in amber, and the counters at the top summarise the totals.
- Jump between changes. Use the previous and next arrows, or press P and N on your keyboard, to move through each change one at a time.
- Copy or download. Copy the diff, download it as a .diff file, or save the changed text as a file.
Not sure how it behaves? Click Try Example to load two sample versions of a short project update and see a finished comparison straight away.
Text Diff Checker Features
Live Comparison
The result refreshes automatically as you type or paste, so you do not need to press a button for normal sized text.
Lines, Words or Characters
Switch the comparison level to match the job, from whole changed lines down to single characters inside a line.
Side by Side and Unified Views
View the two texts next to each other with line numbers on both sides, or switch to a single column unified view with plus and minus markers.
Flexible Ignore Rules
Ignore whitespace, case, blank lines, line endings or trailing spaces, and add your own plain text or regular expression patterns.
Change Navigation
Step through changes with the previous and next buttons or the P and N keys. The current change stays highlighted and scrolls into view.
Hide Unchanged Lines
Collapse everything that did not change and keep only the edits and a few lines of context. Folded blocks can be expanded with one click.
Export Options
Copy the diff, download it as a .diff file, download the changed text, or copy either original or changed text back to your clipboard.
Private by Design
The comparison runs locally in your browser. No sign-up is needed and your text is never uploaded or stored anywhere.
How Does a Text Comparison Tool Find Differences?
A diff checker does not just look for matching positions. It works out the longest run of content that both versions share, then treats everything else as an insertion or a deletion. That is why moving one paragraph does not make the whole document look different. The tool handles this in two stages.
Matching the Lines
Both texts are split into lines and lined up against each other. Lines that appear in both stay as unchanged. A line found only on the right is marked as added, a line found only on the left is marked as removed, and a removed line that sits directly opposite an added line is shown as modified.
Looking Inside Modified Lines
In Words or Characters mode, each modified pair of lines is compared a second time. The exact words or characters that differ are highlighted with a strikethrough on the left and an underline on the right, so a one letter typo no longer hides inside a long line or gets overlooked during a quick comparison.
Lines mode is the fastest way to see where a document changed. Words and Characters mode are for the moment you need to see what changed inside those lines.
Compare by Lines, Words or Characters
The Compare by setting controls how much detail you see inside modified lines. The line level result and the counters stay the same, and only the inner highlighting changes.
| Mode | What Gets Highlighted | Best For |
|---|---|---|
| Lines | Whole lines marked as added, removed or modified | Config files, lists, logs, quick reviews |
| Words | Changed words inside each modified line | Articles, contracts, essays, edited paragraphs |
| Characters | Individual characters inside each modified line | Typos, IDs, URLs, hashes, version numbers |
When you use Words or Characters mode, the summary also shows how many words or characters were added and removed in total, next to the line counts.
How to Compare Text Ignoring Whitespace or Case
Many differences are noise. A file saved on another system may use different line endings, an editor may add trailing spaces, and one author may capitalise a word that another wrote in lower case. The Options panel lets you hide this noise so the real edits stand out.
| Option | What It Does |
|---|---|
| Ignore whitespace | Treats text as equal even if spaces or tabs differ anywhere in a line |
| Ignore leading/trailing whitespace | Ignores spaces and tabs at the start and end of each line only |
| Ignore case | Treats upper and lower case letters as the same |
| Ignore blank lines | Skips empty lines so added or removed spacing does not count as a change |
| Ignore line endings (CRLF / LF) | Stops Windows and Unix line endings from showing up as differences |
| Trim trailing spaces | Removes spaces at the end of each line before comparing |
If you only need to clean up stray spacing in a single text, the Extra Spaces Remover does that directly. If you need to normalise capitalisation before comparing, the Case Converter can do it first.
Ignoring Timestamps, IDs and Other Patterns
Some lines change on every run even when nothing meaningful has changed, such as build numbers, dates or session IDs. Under Advanced options you can add Custom ignore patterns, one per line. Any text that matches a pattern is left out of the comparison.
Choose Plain text to ignore exact strings, for example build-1042, or Regular expression to match a whole family of values. Invalid regular expressions are flagged with a message that points to the line with the problem, so you can fix it before the comparison runs. If you want to try a pattern first, the Regex Tester is a quick place to check it against sample text.
Side by Side View or Unified View?
After a comparison, you can switch between two ways of reading the result.
Side-by-Side
Original on the left, changed on the right, each with its own line numbers. This is the easiest way to see how a specific line was rewritten clearly and side by side. On narrow screens the two sides stack so nothing is cut off.
Unified
One column where removed lines start with a minus and added lines start with a plus. A modified line appears as the removed version followed by the added version. This matches how most developers read diffs.
Two more toggles help with long results. Hide unchanged keeps only the changed lines with three lines of context around each, and Wrap lines either wraps long lines or lets you scroll sideways to keep each line on one row.
How to Compare Two Text Files
You do not have to copy and paste. Each panel has an Open file button, and you can also drag a file straight onto either panel. The file is read in your browser and its text fills the panel, with the file name shown above it. Edit the text afterwards and the file name label clears, since the panel no longer matches the original file.
| Supported Extensions | Typical Content |
|---|---|
| .txt, .md, .log | Notes, documentation, log output |
| .csv, .json, .xml, .yaml, .yml | Data exports and configuration |
| .html, .css, .js, .ts, .php, .py, .sql | Source code and queries |
Files up to 20 MB can be loaded, and each panel accepts up to 10 million characters. Anything that is not plain text is rejected with a clear message. Comparing structured data? Running both versions through the JSON Formatter first gives each one the same layout, so only real value changes remain.
Reading the Results
Added
Lines that exist only in the Changed text. They are shaded green.
Removed
Lines that exist only in the Original text. They are shaded red.
Modified
A line that exists on both sides with different content, shaded amber and marked with a tilde for easy identification.
Unchanged and Totals
The summary reports unchanged lines, total lines, and change groups, matching previous/next navigation.
If you want to know how long each version is before you compare them, the Word Counter and Line Counter give quick totals. Each panel here also shows its own character, word and line counts at the bottom.
Common Reasons to Compare Text
Checking Document Revisions
See what an editor, colleague or counterparty changed between two versions of a contract, policy or article, without reading every line twice.
Reviewing Code and Config
Compare two versions of a script, stylesheet, SQL query or settings file and export the result as a .diff to share with your team.
Spotting Silent Edits
Catch a changed number, a swapped word or a missing line in a copy of a page, a quote or terms that looks identical at a glance.
Comparing Logs and Outputs
Put the output of a good run next to a bad run, ignore timestamps with a custom pattern, and see only what actually differs.
Tips for Better Comparisons
Start With Lines Mode
Get the big picture first. Switch to Words or Characters only for the lines you want to look at more closely.
Turn On Hide Unchanged
For long files, collapsing identical sections makes the edits easy to scan, and you can still expand any folded block.
Watch the Tags
When two lines look identical, a small CRLF, LF or whitespace tag next to a modified line tells you the difference is in the line ending or the spacing.
Very Large Inputs
For very large text, the tool waits for you to click Compare or press Ctrl+Enter instead of updating on every keystroke.
Frequently Asked Questions
How do I compare two texts online for free?
Paste your first text into the Original panel and your second text into the Changed panel. The differences appear automatically below, with added, removed and modified lines highlighted. No account or payment is needed.
How can I find the difference between two text files?
Click Open file on each panel, or drag a file onto it, to load its contents. The tool supports common text based formats such as .txt, .md, .csv, .json, .xml, .yaml, .log, .html, .css, .js, .php, .py and .sql. Once both sides are loaded, the comparison runs on its own.
Can I compare text and ignore case or whitespace?
Yes. Open Options and tick Ignore case, Ignore whitespace, Ignore leading/trailing whitespace, Ignore blank lines, Ignore line endings or Trim trailing spaces. The result updates as soon as you change an option.
What is the difference between Lines, Words and Characters mode?
Lines mode marks whole lines as added, removed or modified. Words mode also highlights the exact words that changed inside a modified line, and Characters mode highlights individual characters. Use Characters mode when you are hunting for a small typo.
What does Modified mean compared with Added and Removed?
Added means a line exists only in the Changed text, and Removed means it exists only in the Original text. Modified means a line was replaced by a different version of itself, so both sides have a line in that position but the content is not the same.
Can I ignore timestamps, IDs or other text that always changes?
Yes. Under Advanced options you can enter custom ignore patterns, one per line, as either plain text or regular expressions. Anything that matches is ignored during the comparison, and your original text is never modified.
What is the difference between Side-by-side and Unified view?
Side-by-side shows the original and changed text in two columns with separate line numbers. Unified shows a single column where removed lines begin with a minus sign and added lines begin with a plus sign.
Can I download or copy the comparison result?
Yes. You can copy the diff to your clipboard, download it as a .diff file in unified diff format, download the changed text, or copy the original or changed text separately.
Is there a file size or text length limit?
Each file can be up to 20 MB, and each panel can hold up to 10 million characters. For very large combined input, the comparison starts when you click Compare or press Ctrl+Enter.
Is my text uploaded to a server?
No. The text you type, paste or open is compared entirely inside your browser and is never uploaded or stored by the site.
Is it safe to compare text online with this tool?
Yes. This tool processes everything on your own device. The comparison runs in your browser, files you open are read locally, and nothing is uploaded or stored by the site, so it is suitable for drafts, config files and code you want to keep private. The only thing remembered is your display settings, such as the comparison mode, the view and your ignore options, which stay in your own browser.
How do I jump from one change to the next?
Use the up and down arrow buttons above the result, or press N for the next change and P for the previous one. The counter shows which change you are on out of the total.
What if the two texts are identical?
The tool shows a message saying no differences were found. If you expected differences, check whether an ignore option such as Ignore case or Ignore whitespace is switched on.
Does the tool remember my settings?
Yes. Your comparison mode, view, Hide unchanged, Wrap lines and ignore option choices are saved in your own browser. Your text itself is not saved.
Does this tool work on mobile devices?
Yes. On narrow screens the two panels stack vertically and the buttons become larger, so the tool works on phones and tablets as well as desktop browsers.
