OpenReplay Logo
12k

Diff checker

Compare two blocks of text and get a clean, line-by-line diff with inline character highlights — processed locally, nothing leaves your browser.

Processed locally
Differences
Enter text in both panes to see the differences.

About this tool

A diff checker compares two versions of text and reports exactly which lines were added, removed, or left unchanged. This tool runs a Myers O(ND) line diff — the same greedy longest-common-subsequence algorithm behind `git diff` — to find the shortest edit script between your original and changed input, then renders it as a unified view: removed lines on a red background with a "-" gutter, added lines on green with a "+", and unchanged lines plain. For lines that were edited rather than wholly replaced, it computes a second character-level diff and highlights just the spans that actually changed on each side.

Use it to review a code change before committing, spot the difference between two config files or API responses, confirm what a find-and-replace actually touched, or check edits in copy and documentation. Toggle "Ignore case" to treat capitalization changes as equal, or "Ignore trailing whitespace" to ignore line-ending noise, and the comparison reruns live as you type.

Everything runs in your browser — neither block of text is ever uploaded, so it is safe to paste source code, config, or other sensitive content.

Frequently asked questions

What algorithm does a diff checker use to compare text?

Most line diffs, including this one, use Myers' O(ND) algorithm, which finds the shortest edit script (the fewest line insertions and deletions) by searching the edit graph along its diagonals. It is the same approach Git uses by default.

What is the difference between a line diff and a character diff?

A line diff reports whole lines as added, removed, or unchanged, while a character diff highlights the exact characters that changed within a line. This tool does both: it diffs by line first, then runs a character diff on paired changed lines to show inline highlights.

Does ignoring case or trailing whitespace change the displayed text?

No. Those options only affect how lines are compared for equality, so two lines that differ solely by case or trailing spaces are treated as a match. The original text, including its exact casing and spacing, is always shown unchanged in the diff.