Text Diff Checker
Compare two texts with line, word, or character-level diffing. LCS-based algorithm.
2
Additions
2
Deletions
2
Unchanged
| 1 | 1 | The quick brown fox | |
| 2 | − | jumps over the lazy dog | |
| 2 | + | leaps over the active cat | |
| 3 | 3 | This line stays the same | |
| 4 | − | Hello World | |
| 4 | + | Hello Beautiful World |
A diff checker is a tool that compares two pieces of text side by side and highlights the lines and characters that differ between them, making it easy to spot additions, deletions, and changes. Developers use diff checkers to review code changes, compare configuration files, and verify that a document was edited in the expected way. AlteredIdea's diff checker runs entirely in your browser: neither version of your text is sent to any server.
Free online text diff checker: line, word & character comparison
A text diff checker compares two versions of a document and highlights what has changed. Whether you're reviewing a colleague's edits, auditing a configuration change, or checking that a code refactor didn't introduce unintended modifications, a diff tool makes the differences immediately visible instead of forcing you to read both versions manually.
This tool runs entirely in your browser using a Longest Common Subsequence algorithm: the same foundation used by git diff, GNU diff, and most modern code review platforms. Three diff modes let you zoom in or out: Line Diff gives a high-level birds-eye view, Word Diff highlights the exact phrases that changed within each line, and Character Diff surfaces single-character edits like transposed letters or invisible whitespace discrepancies.
Step-by-step guide
- 1Paste your original text
Add the baseline version of your content into the left panel. It can be code, prose, config files, or any plain text. - 2Paste the modified text
Add the newer or changed version into the right panel. Both panels support unlimited length. - 3Choose a diff mode
Select Line Diff for a high-level overview, Word Diff for inline change highlights, or Character Diff for the most granular view. - 4Tune the comparison options
Toggle “Ignore whitespace” or “Ignore case” to filter out noise that isn't semantically meaningful. - 5Copy the unified diff
Use the “Copy Unified Diff” button to export a standard patch format you can share with teammates or apply with git apply.
Related Tools
JSON Formatter
Validate, format, minify, and explore JSON. Syntax highlighting, error detection, and tree view.
SQL Formatter
Format SQL queries with keyword casing, indentation, and clause alignment.
Regex Tester
Test regular expressions with live matching, group capture, flags, and match highlighting.
Base64
Encode and decode Base64 strings and files. Supports text, binary, and data URLs.
Frequently Asked Questions
- What diff algorithm does this tool use?
- It uses a Longest Common Subsequence (LCS) algorithm, the same foundation as the classic Unix diff utility. LCS produces minimal, human-readable diffs that clearly identify the shortest edit path between two texts.
- What is the difference between line diff, word diff, and character diff?
- Line diff marks entire lines as added or removed and is best for code review. Word diff highlights individual word changes within each line, making it ideal for prose editing. Character diff operates at the single-character level and is most useful for spotting typos or subtle encoding differences.
- Does my text get sent to a server?
- No. All diffing happens entirely in your browser using JavaScript. Your text never leaves your device, making it safe to use with confidential code, documents, or personally identifiable information.
- What does “Ignore whitespace” do?
- When enabled, leading and trailing whitespace on each line is stripped before comparison. This prevents cosmetic indentation changes from appearing as meaningful differences, which is useful when comparing code reformatted by different editors.
- What does “Ignore case” do?
- Both texts are lowercased before the comparison, so differences in capitalisation are not flagged as changes. This is handy for comparing HTML attribute names or case-insensitive config keys.
- What is a unified diff and when would I use it?
- A unified diff is the standard patch format (--- / +++ headers followed by +/- lines) used by git and other version-control tools. You can copy it from this tool and apply it to a file with the patch command or share it in a pull request description.
- Can I compare large files?
- Yes, there is no artificial size limit. For very large texts the LCS computation may take a moment because its complexity is O(n × m), but modern browsers handle tens of thousands of lines comfortably.
- How do I compare two code files?
- Open both files in a text editor, select all, and paste each into the corresponding panel. The diff checker works with any programming language because it treats input as plain text.
- Why are some lines shown as both removed and added instead of “changed”?
- In Line Diff mode, a modified line appears as one deletion and one addition because the algorithm works at the line level. Switch to Word Diff mode to see both the old and new version side by side with the specific words highlighted.
- Is this tool free?
- Yes, completely free with no account required. There are no usage limits, watermarks, or hidden fees.
AlteredIdea vs alternatives
vs server-side tools: Everything runs in your browser: your data never leaves your device.
vs VS Code extensions: No install needed. Works instantly in any browser.
vs paid tools: Completely free, no account required.