Diff Checker
Paste two texts to compare them line by line. Highlights every addition, deletion, and character-level change — unified or side-by-side view.
Paste text in both panels above to compare.
How to use Diff Checker
- 1Paste your original text
Click the Original panel on the left and paste the baseline version of your text — a file, a config snippet, a draft, or any content you want to compare.
- 2Paste the modified text
Click the Modified panel on the right and paste the updated version. The diff updates instantly as you type.
- 3Choose a view mode
Select Unified to see additions and deletions in a single scrollable column, or Side by Side to view the two versions next to each other with matching lines aligned.
- 4Read the highlighted differences
Green lines are additions, red lines are deletions. For lines that changed partially, individual characters are highlighted within the line so you can spot small edits at a glance.
- 5Copy or swap the result
Click Copy diff to copy the full unified diff to your clipboard. Use the Swap button to reverse original and modified, or Clear to start a new comparison.
Frequently Asked Questions
Does the Diff Checker send my text to a server?
- No. All comparison logic runs entirely in your browser using JavaScript. Your text is never transmitted to any server and is not stored anywhere remotely.
What algorithm does the diff use?
- The tool uses the Longest Common Subsequence (LCS) algorithm to produce a minimal line-level diff. For lines that were partially changed, it runs a second character-level LCS pass so you can see exactly which characters were added or removed within a line.
What is the difference between Unified and Side-by-Side views?
- Unified view shows all changes in a single list: deleted lines in red above added lines in green, prefixed with − and + sigils. Side-by-side view places the original on the left and the modified on the right, aligning paired changed lines on the same row for easier visual comparison.
Is there a text size limit?
- There is no hard limit. The LCS algorithm is O(m × n) in time and memory, so very large files (thousands of lines) may take a moment to process. Character-level diff on individual lines longer than ~450 characters falls back to whole-line highlighting to keep the UI responsive.
Can I compare code files?
- Yes. The diff checker works on any plain text — source code, configuration files, markdown, JSON, CSV, prose, or anything you can paste into a text field. It does not apply language-specific formatting, so the comparison is purely text-based.