How to compare code
- Paste the original code into Before and the new version into After.
- Choose whether to ignore whitespace or letter case, then select Compare code.
- Read the line numbers and marked changes. Select Download diff to save the result as a local
.difffile.
Read the marked lines
A minus sign marks a removed line. A plus sign marks an added line. Adjacent removed and added blocks are paired as changed lines; these pairs are a reading aid, not a claim that every line is the same statement.
Before: const total = 2; After: const total = 3;
Comparison options
Ignore whitespace removes whitespace within each line for matching, including spaces inside strings. Ignore case compares lowercased text. These options change text matching; they do not check whether code has the same meaning.
CRLF and LF line endings compare equally. A missing final newline remains a difference. Blank lines and repeated lines are kept.
Download the diff
The download contains a unified diff with the full input as context, fixed filenames before and after, and markers for missing final newlines. It follows the selected ignore options, so ignored differences are omitted. Download is available when the current comparison has changes.
Large inputs and errors
Each input accepts up to 120,000 characters and 2,000 lines. A comparison with very many differences may reach its work limit before these size limits. Error DF03 or DF04 asks you to compare a smaller section; your original text remains in the inputs.
DF01 or DF02 means the tool or comparison worker could not load or run. Check your connection and select the retry button. DF05 means a download could not start. Technical details retain the original error message.
Your code
Your pasted code is compared on this device and is not uploaded. Reloading closes this working copy; copy or download what you need first. Read the privacy details.
Open the diff code checker