Diff Checker
Compare two newline-separated texts with an LCS line diff. See inserted and removed rows, understand reorder behavior and the one-million line-pair limit.
Tool inputs are processed on your device. Anonymous usage events are recorded separately.
Paste both texts to see the diff.
How to use it
- 1
Paste both versions
The tool splits each input on line feeds and recalculates the comparison as you type.
- 2
Review changed lines
Green rows appear only on the right; red rows appear only on the left. The diff is skipped when line counts exceed one million pair comparisons.
Paste the original on the left and changed text on the right. The comparison splits on line feeds and uses a longest-common-subsequence (LCS) algorithm to retain matching lines in order. For example, comparing "alpha / beta" with "alpha / gamma / beta" reports one added line, gamma, while alpha and beta remain in the common sequence.
This is a line-level diff, not a word-level or character-level comparison. A changed sentence on one line appears as a removed line plus an added line. Reordered lines may also appear as a delete/add pair; the tool does not label moves. With repeated identical lines, multiple valid alignments can exist, and the implementation chooses deletions first when LCS lengths tie.
The dynamic-programming comparison uses memory proportional to the number of line pairs. To avoid building an oversized table, the page skips comparisons when the product of input line counts exceeds one million. Break larger files into smaller sections. Empty input on either side does not run a diff.
The text is compared in your browser and is not sent to the AI gateway. A limited usage event reports the tool ID, timing and success status, not the content. See the Privacy Policy for analytics and advertising data flows.
FAQ
Is this a character-level or line-level diff?
Line-level. Each line is compared as a unit; changed words inside one line are not marked separately.
How are moves and repeated lines shown?
The longest-common-subsequence algorithm preserves matching line order. A moved line may appear as a removal and an addition rather than a dedicated move. Repeated identical lines can make more than one valid alignment possible.
Why is there a size limit?
The dynamic-programming table needs memory proportional to the product of the two line counts. The browser diff is skipped above one million line pairs to limit memory use; split a large comparison into smaller sections.
Is my text sent to a server?
The comparison runs in your browser and the text is not sent to the AI gateway. A limited usage event reports the tool ID, timing and success status, not either text. See the Privacy Policy for analytics and advertising data flows.
Related tools
JSON Formatter
Beautify JSON with two-space indentation or minify it to one line. Invalid input shows the browser parser error; JSON is processed locally.
Regex Tester
Free regex tester: enter a pattern and test string to see matches highlighted live, with capture groups listed. Flags supported — no sign-up, no upload.
Remove Duplicate Lines
Deduplicate a newline-separated list while keeping the first occurrence and original order. Control case matching and blank lines; see exactly how whitespace is compared.
Markdown Preview
Preview Markdown locally with tables, task lists, strikethrough and fenced code blocks. Compare the rendered draft with your target platform because parser features and styling differ.