Text Diff Checker
Paste two texts and compare them line by line — additions, deletions, and changes highlighted
Unified diff
Text Diff Checker — Tips & Guide
A diff checker compares two versions of a text and shows exactly what has changed — which lines were added, removed, or modified. It's an essential tool for code review, document comparison, and debugging.
Review Code Changes
Paste the old and new versions of a function or file to see exactly what changed. The line-level diff pinpoints the precise modifications, making code review faster and more accurate.
Compare Document Versions
Paste two versions of a document, contract, or article to detect edits, additions, or deletions. The unified view makes reviewing tracked changes easy without a word processor.
Debug API Responses
Paste two JSON or XML API responses side by side to quickly see what changed between versions. This is especially useful when diagnosing regressions or unexpected behavior.
A diff checker is a tool that compares two pieces of text and highlights the differences between them. It identifies which lines (or characters) were added, removed, or left unchanged. The term "diff" comes from the Unix diff command, which has been used since the 1970s to compare files. Diff checkers are widely used in software development (code review), writing (document revision), and data analysis.
Paste the original version of your text into the "Original Text" box on the left, and the new version into the "Changed Text" box on the right, then click "Compare". The diff view will appear below, showing lines removed in red with a - prefix and lines added in green with a + prefix. Lines that are the same in both versions are shown in white. Enable "Inline character diff" for character-level highlighting within changed lines.
The unified diff format is a standard text format for representing the differences between two files. It shows a few lines of context around each change, with - marking lines removed from the original and + marking lines added in the new version. It was standardized by POSIX and is the default output format of the git diff command. The "Copy diff" button exports the diff in this format.
git diff uses a Myers diff algorithm (a refined LCS-based approach) to compute the minimal edit distance between two versions of a file. It outputs differences in unified diff format, showing the changed lines with surrounding context. When you run git diff HEAD~1, git compares the current working tree against the previous commit, line by line, and shows what was added or removed in each file.