Calculates on this device. File exports run online.
Code Diff Checker
Paste or open the original and the changed version. The page lists each line that was added, removed or changed, marks the words that changed, and writes a unified diff (.diff) that git and patch can read. Spaces, upper and lower case and empty lines can be ignored.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to compare two texts
- Paste the original in Original text and the new version in Changed text, or open the two files.
- Choose whether spaces, upper and lower case, or empty lines should count.
- Press Compare. The table lists each difference with its line numbers; below it, the changed text shows what changed, and the .diff file can be copied or downloaded.
Reading the results
- Added lines are only in the changed text, removed lines only in the original, and a changed line is a removed line replaced by an added one at the same place.
- The unified diff starts with --- (the original) and +++ (the changed version). Each block starts with @@ -line,count +line,count @@; lines with - were removed, lines with + were added, and lines with a space are shown for context.
- Word by word writes the changed text with removed words as [-…-] and added words as {+…+}, as git diff --word-diff does. It suits paragraphs and HTML text.
Reading a git diff or a .patch file
Choose Read a git diff or .patch file and paste the output of git diff, git show or diff -u. The page lists the files, how many lines each gains and loses, and every changed line with its old and new line numbers, as diff viewers such as diff2html show them.
Comparing two files or two folders
In the box below, choose two files, or two ZIP files that hold two versions of a project. The server compares every file of the two folders (images and other non-text files are only reported as changed or not) and returns a .patch file for the whole project and a side-by-side report that opens in any browser. For two database schemas and the ALTER statements between them, use the Database Schema Designer.
Limits you should know
- The page compares line by line and finds the smallest set of changes (Myers’ method). The server uses Python difflib, which can line up repeated lines differently; both results are correct diffs.
- Windows (CR LF) and Unix (LF) line breaks are treated as the same. A missing line break at the end of the last line is shown in the .diff file.
- The page stops when two texts differ in more than 3,000 lines: use the box below for very different versions.
- Code is compared as text. It is never run, and moved blocks are shown as removed in one place and added in another.
Privacy
Texts are compared in your browser. Only when you use a box below is anything sent to the Toolvito server: the two texts shown above, or the files you choose there. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.