About the Diff Checker
Diff Checker compares two versions of a text and shows what changed: lines that were added, lines that were removed, and – inside lines that were edited – the exact words that differ. It is useful for contracts and other documents, configuration files, code snippets, translations and any text that has been revised.
The comparison runs in your browser using the open-source jsdiff library. Your texts are not uploaded, which makes the tool suitable for confidential documents and private code.
How to use it
- Paste the earlier version into "Original" and the newer version into "Changed", or use "Open file" under each box to load a text file.
- The comparison updates automatically. The summary shows how many lines were added and removed.
- Tick "Ignore whitespace" or "Ignore case" if differences in spacing or capitalisation do not matter.
- Switch between "Side by side" and "Unified" views. Changed words are highlighted within each line.
- Use "Download .diff" or "Copy diff" to save the changes in the standard unified diff format.
Features
- Line and word level: Lines are matched first; inside edited lines, the changed words are highlighted.
- Two views: Side by side for wide screens and a compact unified view for phones, with line numbers on both sides.
- Ignore options: Compare while ignoring differences in spacing and indentation, or in upper and lower case.
- Unified diff export: Download or copy the changes as a .diff file that works with git apply, patch and code review tools.
- Stays responsive: Large comparisons run in a background thread, so the page never freezes.
Examples
Checking a revised contract
Paste the version you signed off and the version you received back. The changed clauses stand out, including a single changed number in an otherwise identical sentence.
Comparing configuration files
Open two .env or YAML files with "Open file" and tick "Ignore whitespace" to see only the settings that really differ.
Sharing a change
After comparing two versions of a script, click "Download .diff" and attach the file to a ticket so a colleague can apply it with git apply.
Limitations and notes
- Each side can hold up to 5 MB of text. Binary files such as Word or PDF documents cannot be compared – copy their text instead.
- Very different texts can take long to compare; the comparison stops after 5 seconds and asks you to compare smaller parts.
- The .diff export compares the original texts (with Windows and Unix line endings treated alike); the ignore options only affect what is shown on the page.
- To keep the page fast, at most 5,000 rows are displayed. The .diff download contains all changes.
- Only two texts can be compared; three-way merges are not supported.
Frequently asked questions
Are my texts uploaded to a server?
No. Both texts are compared by JavaScript running in your browser. Nothing is sent over the network or stored.
What does "Ignore whitespace" do?
Lines are compared after collapsing runs of spaces and tabs into one space and removing spaces at the start and end. Lines that differ only in indentation or spacing are treated as equal.
What is a .diff file?
A .diff (or .patch) file lists changes in the unified diff format: removed lines start with "-" and added lines with "+". Version control systems such as Git use the same format.
Why is a whole line marked as changed when only one word differs?
The line is shown as changed, and the differing words inside it are highlighted more strongly. For extremely long lines, the word-level highlight is skipped to keep the comparison fast.