About this text diff
Most edits to config files, source code, prose or logs are not valid JSON, so a JSON-aware comparison cannot help with them. This checker performs a plain line-by-line comparison of any two text blocks, independent of the structural JSON diff the JSON Diff Checker performs.
The comparison finds the longest common sequence of matching lines and reports everything else as added or removed, so a single inserted line does not falsely mark every later line as changed.
Config files, code changes, documentation updates, and log outputs don't parse as JSON. A structural JSON diff tool can't help when you need to compare plain text, scripts, or logs. This free online text diff tool performs intelligent line-by-line comparison of any two text files, ignoring cosmetic whitespace and case changes if you want them ignored, and showing you exactly which lines were added, removed, or changed.
The longest common sequence algorithm finds the real changes, so inserting one line doesn't falsely mark every later line as different. Choose to ignore whitespace changes (perfect for comparing code indentation differences or YAML formatting) or ignore case (useful for text where capitalization varies). View the result as a readable diff with additions marked with + and removals marked with -, or copy for pasting into documentation or pull requests.
Common use cases: code review (examining what actually changed between versions), deployment verification (confirming configuration changes are as expected), log analysis (finding new error messages or differences between runs), and documentation updates (ensuring only intended changes were made). Upload files or paste content directly. All comparison happens locally in your browser.
How to use this tool
-
01
Add the original text
Paste or type the earlier version on the left, or upload or drag a file onto the box.
-
02
Add the changed text
Paste, type, upload or drop the newer version on the right, then select Compare, or press Ctrl/Cmd+Enter in either box.
-
03
Adjust matching if needed
Turn on Ignore whitespace or Ignore case to stop indentation or letter-case changes alone from being reported as differences.
-
04
Copy the result
Select Copy result to copy a plain-text rendering with added lines marked +, removed lines marked - and unchanged lines left blank.
Worked examples
A small nginx config change
Before:
server {
listen 80;
server_name example.com;
root /var/www/html;
}
After:
server {
listen 443 ssl;
server_name example.com;
root /var/www/html;
gzip on;
}- listen 80;
+ listen 443 ssl;
server_name example.com;
root /var/www/html;
+ gzip on;Limits and edge cases
- This is a line-based diff, not a character-based one: a single changed character still marks its whole line as removed and re-added. It also does not parse or understand JSON, YAML, code syntax or any other file format.
- Ignore whitespace trims each line before comparing it, and ignore case lowercases each line before comparing it; in both cases the original, unmodified text is still what gets displayed and copied.
- Lines are split on LF, CRLF or CR, so mixed line endings between the two inputs do not by themselves create false differences. A trailing newline still produces one extra empty line, matching common command-line diff tools.
- All comparison happens in this browser tab. Uploaded or dropped files are read locally and are never sent anywhere.
Standards and references
Common questions
How is this different from the JSON Diff Checker?
The JSON Diff Checker parses both inputs as JSON and compares the resulting values by path, ignoring whitespace and key order. This tool never parses the input; it compares any plain text — config files, code, prose or logs — line by line, so two JSON documents with reordered keys would still show as different lines here.
Can I compare two files instead of pasting text?
Yes. Use the file inputs under each box, or drag a file directly onto a text box, and its contents load as plain text for comparison.