Skip to content

Diff Checker

Compare two blocks of text side by side. See added, removed, and unchanged lines with color highlighting.

Paste text in both fields to see the diff

How text diffing works

Diff algorithms identify the minimum set of changes between two sequences. The Longest Common Subsequence (LCS) algorithm finds lines shared by both versions, then classifies the remaining lines as additions or deletions. This is the same foundational algorithm behind git diff, code review tools, and merge conflict resolution.

Use cases for diff checking

Compare configuration files before and after changes. Review API responses across deployments. Verify database migration scripts produce expected schema changes. Check localization files for missing translations. Any time you need to answer "what changed between version A and version B," a diff tool gives you the answer.

Reading diff output

Green lines with a + prefix were added in the modified version. Red lines with a - prefix were removed from the original. Unchanged lines provide context. Line numbers on the left correspond to the original text; line numbers on the right correspond to the modified text.

Beyond text diff

For structured data comparison, convert both versions to a normalized format first. Use our JSON Formatter to pretty-print JSON before diffing so that formatting differences don't mask content changes. For YAML configurations, our YAML Formatter can normalize indentation before comparison.

Frequently Asked Questions

What algorithm does this diff tool use?
This tool uses a Longest Common Subsequence (LCS) algorithm to compute the minimal diff between two texts. It identifies unchanged lines that both versions share, then marks the remaining lines as added or removed.
Can I compare files?
This tool compares text pasted into the two input fields. To compare files, open them in your editor and copy-paste the contents. For Git-tracked files, use git diff in your terminal for file-level comparison.
What do the colors mean?
Green lines (marked with +) are present in the modified text but not in the original. Red lines (marked with -) are present in the original but not in the modified text. Lines without color exist in both versions.
Is my text sent to a server?
No. The diff computation runs entirely in your browser using JavaScript. Nothing is transmitted over the network.