Compare two blocks of text and instantly see the differences highlighted line by line
Enter text in both fields and click Compare to see the differences.
How to Read a Text Diff Well
What a diff shows
The minimal set of changes (additions, deletions, unchanged parts) between two texts β the everyday tool for code review, document revisions, and config changes.
Practical tips
Whitespace surprises: texts that look identical can differ by tabs vs. spaces, trailing spaces, or CRLF vs. LF line endings. Suspect these first when a diff looks empty-but-isn't.
Granularity: line-level diffs flag a whole line for a one-character change; word-level comparison reads better for prose edits.
Comparing JSON/configs: format both sides with the same tool first β meaningless ordering and indentation differences disappear, leaving only real changes.
Everything is processed in your browser and never uploaded, so internal documents are safe to compare here.
Frequently Asked Questions
A diff checker is a tool that compares two blocks of text and highlights the differences between them. It shows which lines were added, removed, or changed, making it easy to review modifications in code, documents, or any text content.
Side-by-side view places the original text on the left and modified text on the right, aligning matching lines. Differences are highlighted with colors: red for removed lines, green for added lines, and yellow for changed lines with character-level highlighting.
Unified diff view shows both texts in a single column with prefixes: lines starting with '-' were removed, '+' were added, and lines without a prefix are unchanged. This is the format commonly used in Git and patch files.
Yes, this diff checker works with any text including source code, configuration files, JSON, XML, HTML, CSS, and more. It preserves formatting and shows exact character-level differences within changed lines.
When enabled, the ignore whitespace option treats multiple spaces, tabs, and trailing whitespace as equivalent. This is useful when comparing code that may have different indentation styles but is otherwise identical.
Case insensitive comparison treats uppercase and lowercase letters as the same. For example, 'Hello' and 'hello' would be considered identical. This is useful when comparing text where capitalization differences are not important.
For lines that are similar but not identical (changed lines), the tool highlights the specific characters that differ within each line. This makes it easy to spot small changes like typos, variable name changes, or single-character edits.
This tool runs entirely in your browser, so there are no server-imposed limits. However, for best performance, we recommend comparing texts under 10,000 lines. Very large texts may cause slower processing.
Yes, click the 'Copy Diff' button to copy the unified diff output to your clipboard. This produces a standard diff format that can be shared, saved as a .diff file, or used with patch tools.
Absolutely. All text comparison happens locally in your browser. Your data is never sent to any server, making it completely safe for comparing sensitive code, configuration files, or private documents.