Compare Text Side by Side
Compare two texts and see exactly what changed. Character-accurate diffs with color highlighting.
Press "Compare" to see the diff
Compare two texts and see exactly what changed. Character-accurate diffs with color highlighting.
Press "Compare" to see the diff
Diff is a free text comparison tool that shows exactly what changed between two versions of a document or code file. Compare at line, word, or character level with clear red/green highlighting, upload files or paste text directly, and swap panels when you paste in the wrong order.
Reviewing what changed is a core part of almost every technical workflow: checking a colleague’s code changes, comparing two versions of a configuration file, verifying that a contract or document was not silently altered, or confirming that a migration did not drop any records. Diff makes these checks fast and reliable by highlighting additions and removals at the level of detail you need — coarse line-level diffs for a quick scan, or character-level diffs to catch a single changed character in a long string. Because the comparison happens locally, you can safely diff confidential code, contracts, and personal documents without uploading them anywhere.
Diff uses the jsdiff library to compare text at three levels: line-by-line (shows entire lines added/removed), word-by-word (highlights changes within lines), and character-by-character (shows smallest possible changes). Removed pieces are highlighted in red, added pieces in green.
Both! Paste text directly into the two panels, or click 'Upload' to load text from files. The tool supports .txt, .js, .html, .css, .json, .md, .py, .ts, and more.
No. All text comparisons happen entirely in your browser. Nothing you paste or upload is ever sent to any server. Diff is safe for comparing confidential code or documents.
Diff detects additions (text present in the right panel but not the left), removals (text present in the left panel but not the right), and equal/unmodified text. The statistics bar shows exactly how many lines or characters were added and removed.
Yes! Click the 'Swap' button to exchange the contents of the left and right panels. This is useful when you accidentally paste text in the wrong panel or want to reverse the comparison direction.
Yes. Diff is well suited for code review: upload or paste two versions of a file and switch to line mode to see changed hunks, or use character mode to catch a single changed character. The side-by-side layout keeps both versions readable while highlighting exactly what changed, and since everything runs locally you can safely diff proprietary or confidential code.
Yes. The two-panel layout stacks vertically on smaller screens, and the diff highlighting remains color-coded and readable. Pasting text or uploading files works the same way on phones and tablets as it does on desktop.