Text & Code Diff Checker
Compare two text versions line by line with visible additions, deletions and matching options.
Compare two versions
Processed locally in your browser. No uploads or external requests. Up to 100,000 characters and 1,000 lines per side; comparison matrix is capped at one million cells. Ignore whitespace removes all whitespace for matching, including internal spaces. Case-insensitive comparison is Unicode lowercase-based, not locale-specific.
Line comparison
Understand your results
For developers and editors reviewing small code, configuration or document revisions.
A bounded longest-common-subsequence comparison aligns equal lines and marks inserted or deleted lines. It compares text rather than programming-language meaning. For example, replacing a configuration line is shown as a removal and an addition; a moved block may be represented the same way. Original and modified columns preserve their respective source text.
How to use this tool
- Paste the original and modified versions into their labeled editors.
- Choose whether whitespace and letter case should affect matching, then run Compare versions.
- Read line numbers and explicit change labels, and copy the plain-text comparison if needed.
What the observations mean
Addition/removal labels and source line numbers identify changed rows. Equal rows may have different spelling when whitespace or case is intentionally ignored.
Worked example
Review a one-line configuration replacement.
Original:
color=blue
size=A5
Modified:
color=green
size=A5The comparison shows color=blue as a removed line, color=green as an added line and size=A5 as unchanged. It does not classify this as a semantic configuration change.
Limits and processing
Local line comparison is bounded to 100,000 characters/1,000 lines per side and a one-million-cell matrix. Moved lines can appear as removals/additions; ignoring case or whitespace can deliberately hide meaningful differences.
Common problems and practical fixes
- Comparison exceeds limits
- Reduce the excerpt around the change rather than comparing unrelated whole files.
- Changes disappear
- Disable ignore-whitespace or enable case sensitivity before reviewing code-sensitive edits.
- Moved lines look deleted
- This algorithm aligns common sequences; it does not classify moved blocks separately.
Best practices
Use a version-controlled patch and language-aware tests before applying code changes.
Practical tips
- Compare focused excerpts rather than entire generated bundles; the matrix cap prevents unbounded quadratic work.
- Ignore whitespace removes internal whitespace too. Code such as a b and ab will compare as equal under that setting.
- This line-based tool does not detect renames, syntax errors or semantic equivalence. Keep a source-control diff for production review.
Frequently asked questions
Practical answers for using the Text & Code Diff Checker.
Why is a changed line shown twice?
Line comparison represents a replacement as a removed original line and an added modified line. It is not a character-level patch.
Can I compare an empty version?
Yes. One empty side shows all lines on the other side as additions or removals. Two empty sides produce no changed lines.
Why is a large comparison refused?
Each side is capped at 100,000 characters and 1,000 lines, and the comparison matrix at one million cells. Smaller samples keep interaction responsive.