Diff Checker

Local Processing

Compare two text files side-by-side or inline, highlight line, word, and character differences, detect moved text blocks, and export patches locally. Compare text codes side-by-side or inline, highlight changes with word-level/character-level backgrounds, detect block moves, and export standard patches.

🏷️ Version: 1.0.0📅 Updated: 22 July 2026 Runs entirely in your browser No uploads Privacy First

Original Text (A)

Modified Text (B)

🔒 Privacy Notice: All comparisons and diff calculations are performed locally in your browser. Your files and paste values are never uploaded or stored.

Frequently Asked Questions & Diff Checker Reference

🤔 How does the Longest Common Subsequence (LCS) algorithm work?

The LCS algorithm is a classic dynamic programming approach. It compares two arrays (in this case, lines of text) to find the longest sequence of elements that appear in both inputs in the same order. By backtracking from the longest matching index path, it calculates exactly which lines were deleted (present only in text A), added (present only in text B), or kept unchanged.

🚀 Why are modifications and block moves handled separately?

Standard diff checkers treat moves as a deletion followed by an addition, which can clutter output comparisons. Block move heuristics scan the text for consecutive deleted sequences that match added sequences elsewhere. Separating them into a warning banner helps developers immediately locate structural code adjustments.

📝 What is a Unified Patch (.patch) file?

A Unified Patch format is a standard file structure used by utilities like patch or git apply to apply changes to a codebase. It includes header details (original vs modified files) followed by lines prefixed with a space (unchanged), minus - (removed), or plus + (added). This makes it highly portable to share code alterations.