Spot every change between two texts in seconds
Paste your original text on the left and your updated version on the right. The text diff checker highlights exactly what was added, removed, or changed — line by line — so you never have to hunt for differences by eye again.
Your text stays entirely in your browser. Nothing is sent to any server, so you can safely compare passwords, private configs, or confidential documents.
How to use the text diff checker
- Paste your original text into the left panel.
- Paste the updated or second version into the right panel.
- The tool instantly highlights added lines in green and removed lines in red.
- Scroll through the results to review every change. Copy or note whatever you need.
Worked example – comparing two config files
Say you have two versions of a simple config file and want to see what changed between them.
Version A (original):
host: localhost
port: 3000
debug: false
log_level: warnVersion B (updated):
host: localhost
port: 8080
debug: true
log_level: info
timeout: 30What the diff checker shows:
- Removed:
port: 3000 - Added:
port: 8080 - Removed:
debug: false - Added:
debug: true - Removed:
log_level: warn - Added:
log_level: info - Added:
timeout: 30
Three lines changed and one new line appeared. You'd have stared at that file for a while catching all of that manually — the diff tool finds it instantly.
How to compare text programmatically
If you need to run a text comparison in code rather than a browser, here are minimal working examples in two popular languages.
Python — using the built-in difflib module:
import difflib
original = ['host: localhost
', 'port: 3000
', 'debug: false
']
updated = ['host: localhost
', 'port: 8080
', 'debug: true
']
diff = difflib.unified_diff(original, updated, fromfile='v1', tofile='v2')
print(''.join(diff))This prints a unified diff — the same format used by Git — with - for removals and + for additions.
JavaScript (Node.js) — using the popular jsdiff library:
const Diff = require('diff');
const v1 = 'port: 3000
debug: false';
const v2 = 'port: 8080
debug: true';
const changes = Diff.diffLines(v1, v2);
changes.forEach(part => {
const prefix = part.added ? '+' : part.removed ? '-' : ' ';
process.stdout.write(prefix + part.value);
});Install with npm install diff before running.
How the diff algorithm works
Under the hood, this tool uses the longest common subsequence (LCS) algorithm — the same foundation as the Unix diff command and Git. It finds the longest set of lines shared between both texts, then marks everything else as added or removed.
The result is a line-by-line comparison (sometimes called a line diff or side-by-side diff). Each line is treated as one unit, so a single character change in a long line shows the entire line as changed. The GNU diffutils manual is the canonical reference if you want to go deeper on how these algorithms work.
When to use a text diff checker — and when not to
| Good fit ✅ | Not the right tool ❌ |
|---|---|
| Comparing two drafts of a document | Comparing binary files (images, PDFs, executables) |
| Spotting changes in config files (.yaml, .env, .json) | Finding differences inside a single long line (use a character-level diff tool instead) |
| Reviewing code before committing without Git | Merging changes from three or more versions (use a 3-way merge tool) |
| Checking if two copied texts are actually identical | Comparing very large files (> a few MB) — paste limits may apply |
Other text tools you might find useful
- Need filler text to test layouts? Try the Lorem Ipsum Generator — free placeholder text maker.
- Want to encode or decode text as Base64? Use the Base64 Encode & Decode tool.
- Need to convert text between camelCase, snake_case, or Title Case? Check the Case Converter.
- Turning a title into a clean URL? The Slug Generator does that in one click.
■ Green / + — line exists only in the new version (added)
■ Red / − — line exists only in the original version (removed)
■ Grey / space — line is unchanged in both versions
Paste your two texts above and the differences appear instantly — no sign-up, no upload, no waiting.