A diff viewer (or diff tool) is a utility that compares two pieces of text and highlights the differences between them. It analyzes both inputs line by line, identifying which lines were added, removed, or modified. Diff tools are essential in software development for code review, debugging, and version control workflows.
The concept of "diff" originates from the Unix diff command, first released in 1974 as part of AT&T's Unix. Modern diff tools build on the same core algorithms — primarily the Longest Common Subsequence (LCS) algorithm — to produce minimal, human-readable change sets. Tools like Git, GitHub, GitLab, and Bitbucket all use variations of diff algorithms to display code changes in pull requests and commits.
This online diff viewer runs entirely in your browser. It computes diffs using a JavaScript implementation of the LCS algorithm, with additional character-level diffing for modified lines to show exactly which parts of a line changed. No data is ever sent to any server.