In this diff checker, paste the original text on the left and the changed text on the right to see exactly which lines were added and removed. Switch between a side-by-side view and a unified view like diff -u, ignore whitespace or case, and download the result as a .diff file. The comparison runs in your browser, so configuration files and logs are not uploaded.
Loading the tool… It runs in your browser and needs JavaScript.
Table of Contents
How to compare two texts
Paste or type into the Original and Changed boxes. The comparison updates shortly after you stop typing, or press Compare. The tiles show how many lines were added, removed and left unchanged. Removed lines are marked with - on a red background and added lines with + on a green background, so the change is clear even without colour. Swap sides reverses the comparison.
Side-by-side and unified views
The side-by-side view lines up the two versions with their line numbers, pairing removed lines with the lines that replaced them. The unified view shows one column in the same format as diff -u and Git: each block of changes starts with a header such as @@ -4,6 +4,7 @@, meaning the block starts at line 4 and covers 6 lines in the original and 7 in the changed text. With Show only changes ticked, unchanged stretches are hidden apart from three lines of context around each change; untick it to see the whole file.
Ignoring whitespace and case
- Ignore whitespace removes all spaces and tabs before comparing, like
diff -w. Re-indented YAML or a config file with tabs changed to spaces then shows no differences. - Ignore case treats upper and lower case as equal, like
diff -i, which suits case-insensitive settings such as Apache directives. - Windows (CRLF) and Unix (LF) line endings are always treated the same.
How the comparison works
The tool uses the Myers diff algorithm, the same family of algorithm used by GNU diff and Git, to find the smallest set of added and removed lines. Each side can have up to 5,000 lines and 2 MB. Very different large files can take about a second to compare. The downloaded .diff uses the standard unified format with three lines of context, so patch can apply it.
Tips for clean comparisons
If every line shows as changed, the usual cause is a difference you cannot see: trailing spaces, tabs against spaces, or a file saved with a byte order mark. Tick Ignore whitespace to confirm. Sort both lists first when the order of lines does not matter, such as package lists or IP allow lists.
For server admins
Comparing a config file with its backup before a reload is a good habit. The command-line equivalents:
diff -u /etc/my.cnf.bak /etc/my.cnf
diff -u -w old.conf new.conf > changes.diff
patch --dry-run -p0 < changes.diff
git diff --no-index --word-diff a.txt b.txt
Diff Checker at a glance



Related: JSON Formatter and Validator · SQL Formatter and Beautifier · Git Commands: 42 Everyday Commands with Examples · Word Counter.
Official documentation (checked 9 October 2026): Python documentation: difflib (unified_diff)
Frequently asked questions
How large can the texts be?
Up to 5,000 lines and 2 MB on each side, which covers most configuration files and log excerpts while keeping the page responsive.
Can I apply the downloaded .diff with patch?
Yes. It is a standard unified diff with original and changed as file names; give patch the target file name, for example patch my.cnf < changes.diff.
Does the tool show changes within a line?
It compares whole lines. A changed line appears as one removed and one added line, shown next to each other in the side-by-side view.