Paste your original text in the left panel and your changed text in the right panel, then click Find Differences. Additions are highlighted in green, removals in red, with line numbers throughout. Toggle between Unified and Side-by-Side views. You can also upload files directly. Nothing is ever sent to a server - all comparison runs in your browser.
How to use this tool
Paste your original (older) text in the left editor and the revised (newer) text in the right editor. Click "Find Differences." The diff output appears below with every change clearly marked. To upload a file instead of pasting, use the upload icon at the top of each panel - it accepts .txt, .js, .py, .html, .css, .json, .xml, .md, .sql, .yaml, and dozens of other text-based formats.
The Swap button exchanges the contents of both panels. The Sample button loads a short example if you want to see how the output looks before pasting your own text. The Copy Diff button copies the full diff result to your clipboard.
What is a diff checker?
A diff checker compares two versions of text and shows exactly what changed between them. The name comes from the Unix diff command, first written in 1974, which compared two files line by line and output the differences. Today the term is used broadly for any tool that identifies additions, removals, and unchanged content between two text inputs.
Diff checkers are used by developers to review code changes, by writers to compare document drafts, by lawyers to spot contract redlines, and by system administrators to track config file changes. The core function is always the same: show precisely what is in one version but not the other, without having to read both texts manually.
What does "diff" mean?
Diff is short for difference. In computing it refers specifically to the output of a comparison operation - a structured list of changes between two versions of a file or text. When a developer says "I'll send you the diff," they mean the exact list of lines added and removed, not the full files.
Reading the diff output
Once you click Find Differences, the output panel shows every line from both texts classified into one of three states:
- Green lines (additions): Lines that exist in the changed (right) text but not in the original (left). These were added.
- Red lines (removals): Lines that exist in the original (left) text but not in the changed (right). These were deleted.
- Unchanged lines: Lines that are identical in both texts. Shown without colour to keep the focus on what changed.
The summary bar above the diff shows the count of added lines, removed lines, and unchanged lines at a glance. Line numbers on the left of the output correspond to the original text (in unified view) so you can locate any change in its source document.
Unified vs side-by-side view
The tool offers two ways to display the same diff. Neither is better in all situations - the right choice depends on what you are reviewing.
Unified view
All changes appear in a single column. Removed lines (red) are followed immediately by added lines (green), so you see the before-and-after for each change in sequence. Unchanged lines appear in between to provide context. This is the format used by Git, GitHub pull requests, and most version control systems. It is compact and works well when changes are scattered throughout a long file.
Side-by-side view
Both texts are displayed in parallel columns - original on the left, changed on the right - with corresponding lines aligned next to each other. Changed lines are highlighted in each column. This view is easier to read when comparing prose documents or when you want to read the full context of each version rather than just the delta. It is the standard view in tools like Microsoft Word's Track Changes and most graphical diff tools.
| Feature | Unified view | Side-by-side view |
|---|---|---|
| Layout | Single column | Two columns |
| Best for | Code, long files, scattered changes | Prose, short files, dense changes |
| Used by | Git, GitHub, terminal diff tools | Word Track Changes, graphical diff tools |
| Context | Interleaved with changes | Always visible on both sides |
| Mobile | Works well on narrow screens | Columns stack vertically on small screens |
Use cases
Code review
Compare your working copy against the original to catch bugs, unintended changes, or missing lines before merging. Paste two versions of a function, a configuration block, or an entire file. Works with any language - JavaScript, TypeScript, Python, HTML, CSS, SQL, Go, Java, PHP, and more. You can also upload files directly without copying their contents.
Document and essay proofreading
Compare a draft against a revised version to see exactly what was added, deleted, or reworded - without reading both documents in full. Useful for academic editing, professional writing, and any multi-draft workflow where you need to verify that only the intended changes were made.
Legal and contract review
A single changed word in a contract can alter its meaning significantly. Pasting two versions of a contract or agreement into a diff checker immediately surfaces every change - including additions and removals that are easy to miss in a manual read-through. This is sometimes called redlining.
Config file and infrastructure changes
Paste two versions of a configuration file (nginx, Apache, Docker Compose, Kubernetes YAML, .env) to see every line that changed between environments or deployments. Much faster than scanning both files manually, especially for long config files with changes in the middle.
Content versioning and CMS edits
Track changes between article drafts, blog post revisions, or CMS content updates. Paste the old and new version of a page to confirm that only the intended edits were made and nothing was accidentally deleted or duplicated.
Comparing translated or localized text
When updating a localization file, paste the English source strings against a previous version to see which strings changed and need re-translation. The diff output immediately shows which lines are new or modified versus which are unchanged and can be kept.
How the diff algorithm works
This tool uses a Longest Common Subsequence (LCS) algorithm. Here is how it works step by step:
- Both texts are split into individual lines.
- The algorithm builds a matrix that tracks the longest sequence of lines that appear in both texts in the same order - the LCS.
- Lines in the LCS are classified as unchanged.
- Lines that appear in the original but not the LCS are classified as removed.
- Lines that appear in the changed text but not the LCS are classified as added.
The result is the minimum number of changes needed to transform the original text into the changed version. This is the same principle used by the Unix diff command and by version control systems like Git.
Line-level vs word-level diff
This tool performs a line-level diff: it compares texts line by line, so any change within a line - even a single character - marks the entire line as changed. This is the standard approach for code comparison because code is line-oriented and line-level diffs are easy to read.
Some tools offer word-level or character-level diffs, which highlight the specific word or character that changed within a line. This is more useful for prose editing but produces noisier output for code. For comparing spreadsheet data, use the Excel and CSV comparison tool, which works cell by cell.
Privacy
All diff processing runs entirely in your browser using JavaScript. Your text is never sent to any server, never logged, never stored, and never shared with any third party. The moment you close the tab, the text is gone. This is especially important for sensitive material - legal documents, proprietary source code, internal communications - which should not be pasted into tools that send data to a server.
To verify: open your browser's network panel (F12 in most browsers, then Network tab), paste text and click Find Differences, and confirm that no network requests are made when the diff runs.
Common mistakes
Pasting in the wrong order
The left panel is "Original" and the right panel is "Changed." If you paste the newer version on the left and the older on the right, the diff will still work but the colours will be reversed - your additions will appear as removals and vice versa. If the output looks backwards, use the Swap button to fix it without repasting.
Trailing whitespace and line endings
A line that looks identical may differ only in trailing spaces or in its line ending (Windows uses CRLF, Unix uses LF). This causes the diff to show that line as changed even when the visible content is the same. If you see many "changed" lines that look identical, your texts may have different line endings. Pasting plain text from a plain-text editor rather than a rich-text editor (Word, Google Docs) usually resolves this.
Comparing rich text instead of plain text
Copying from a PDF, Word document, or formatted web page often brings invisible formatting characters. The diff tool compares the raw characters, so hidden formatting can show spurious differences. Always paste as plain text - use "Paste and match style" (Ctrl+Shift+V on most systems) to strip formatting before pasting.
FAQs
What is a diff checker?
A diff checker compares two versions of text and highlights exactly what changed. Additions appear in green, removals in red. It uses a diff algorithm to identify which lines were added, removed, or unchanged, giving you a precise line-by-line view of every change without having to read both texts manually.
What does "diff" mean?
Diff is short for difference. It comes from the Unix diff command (1974) which compared two files line by line. Today the term is used broadly for any comparison of two versions of text or code.
What is the difference between unified and side-by-side view?
Unified shows all changes in a single column with added and removed lines interleaved - the format used by Git. Side-by-side shows both texts in parallel columns so you can read corresponding lines next to each other. Side-by-side is easier for prose; unified is better for code and long files.
Is my text private?
Yes. All processing happens in your browser. Nothing is sent to any server at any point. You can confirm this by watching the network tab in your browser's developer tools while running a diff.
Can I compare code files?
Yes. The tool handles any text-based file. Upload .js, .ts, .py, .html, .css, .json, .xml, .md, .sql, .yaml, .go, .java, .php, and more using the upload button on each panel.
Can I compare Excel or CSV files?
Yes, with the dedicated Excel and CSV comparison tool. It compares spreadsheets cell by cell and finds changed values, added rows, and removed rows.
Is there a file size limit?
No hard limit. The tool runs entirely in your browser and handles any reasonable file size. Very large files (100,000+ lines) may take a moment to process depending on your device.
How is this different from Git diff?
Git diff compares tracked file versions within a repository. This tool compares any two texts you paste or upload, with no repository or version control setup required. The underlying algorithm (LCS) is similar. The output is the same line-level diff, displayed with a visual UI instead of terminal text.