Diff Checker Online — Free, Compare Two Texts or Code Files Side by Side
What's included
Features
About this tool
Compare Two Texts Online and See Exactly What Changed — Free, No Sign-Up
You have two versions of a document, a config file, a JSON response, or a block of code and you need to know what changed. Paste both here and the diff highlights additions in green, removals in red, and unchanged lines in gray — instantly, no button press.
Three display modes cover every scenario. Split view shows the original on the left and the modified version on the right with changes aligned side by side — the way most developers prefer to read a code review. Unified view combines both into a single column with + and − prefixes — the standard format you see in git diff output and .patch files. Inline mode is the most powerful: it highlights the exact characters that changed within a line, not just the whole line. When a single word or number was edited, inline mode shows you precisely which characters without you having to read the entire line twice.
The tool uses the LCS (Longest Common Subsequence) algorithm — the same engine behind Git, GNU diff, and every professional diff tool. This produces minimal diffs that show only true differences, not spurious line changes.
Beyond comparison, the merge pane lets you manually accept or discard individual change hunks to produce a reconciled final version — useful for resolving conflicts between two diverged copies. Share a diff via URL (both panes are encoded in the link) or export a .patch file for git apply.
All computation runs 100% in your browser. Your text is never sent to any server — safe for proprietary code, confidential documents, and config files containing credentials.
Step by step
How to Use
- 1Paste text into both panesPaste the original version into the left pane (labeled A / Original) and the modified version into the right pane (labeled B / Modified). The diff highlights automatically in real time as you type or paste — green for additions, red for removals, gray for unchanged lines. No button press needed. Click Load Sample to see a demo diff with code changes.
- 2Choose a display modeClick Split in the toolbar for side-by-side view with changes aligned across both panes. Click Unified for the standard
+/-format showing both texts in a single column — the same format asgit diffoutput. Click Inline for character-level mode that highlights only the exact characters that changed within a line — essential for spotting single-word or single-number edits. - 3Control diff optionsUse the checkboxes in the toolbar: Ignore WS to ignore whitespace differences, Ignore Case for case-insensitive comparison, Show Same to toggle display of unchanged lines (uncheck to hide them and only see changes), Wrap Lines to toggle word-wrap, Sync Scroll to synchronize scrolling between both panes.
- 4Navigate between change hunksUse the ↑ / ↓ hunk navigation arrows in the toolbar to jump between change blocks without manually scrolling through long texts. The counter shows the current hunk index — e.g.
2/5 changes. Both panes scroll synchronously when Sync Scroll is enabled. - 5View statistics and use the minimapThe legend bar at the bottom of the diff shows:
+N added,−N removed,N same, and~N% similar. The minimap between the two panes shows the distribution of changes across the entire document height — click any position to jump to that location. - 6Merge, export, or share the diffClick Merge to open a merge pane that shows a combined view starting with all of the B-side (modified) changes — you can edit the merged result and click Copy Merged to copy the final text. Click Export to download a standard
.patchfile compatible withgit apply. The history panel auto-saves diffs after 2 seconds of inactivity.
Real-world uses
Common Use Cases
Got questions?
Frequently Asked Questions
Paste the original text into the left pane and the modified version into the right pane. The diff highlights automatically — additions in green, removals in red, unchanged lines in gray. Use Split view to see both texts side by side with changes aligned. Use Unified view for the standard +/- format. Use Inline mode to highlight the exact characters that changed within a line — useful for spotting a single word, number, or symbol that was edited.
Paste both versions of your code or config file content into the panes — the tool works with any plain text format: JavaScript, TypeScript, Python, CSS, HTML, JSON, YAML, SQL, Markdown, shell scripts, Nginx configs, Docker Compose files, Kubernetes manifests, and any other text. No file upload needed — just paste from your editor. Everything runs in your browser so your private code never touches any server.
Switch to Inline mode. Without it, a line that differs by one word still shows as a full red removal and a full green addition — making the actual change hard to spot. Inline character-level mode highlights only the specific characters that changed within the line, leaving the identical parts showing normally. This makes it immediately obvious that only a number, a variable name, or a single word was edited, even in a long modified line.
Yes — all diff computation runs entirely in your browser using JavaScript. Your text is never transmitted to any server. This makes the tool safe for proprietary source code, confidential documents, API keys in config files, database credentials, private keys, and any sensitive content. Closing the browser tab permanently discards everything you pasted — no backend logging, no storage.
Yes. The merge pane lets you manually accept or discard individual change hunks from either side and edit the merged result directly to produce a final reconciled version. This works like resolving a merge conflict manually — you see the two diverged versions and decide which changes to keep from each side. Useful when git merge or rebase left conflicts you want to resolve outside the terminal.
Click the Share button to generate a URL that encodes both text panes. Send this link and anyone who opens it sees the exact same diff without needing to paste the content again — useful for code review comments, bug reports, and Slack messages. Click Export to download a standard unified .patch file compatible with git apply and other Unix patching tools.
Paste both JSON responses into the panes — use the JSON formatter first to sort keys and apply consistent indentation to both, so the diff only highlights genuine value changes rather than formatting noise. Then paste both formatted versions here. Use Inline mode to pinpoint changed field values within lines — a single changed number or string is immediately visible even in a large JSON payload.
Yes — this tool uses the LCS (Longest Common Subsequence) algorithm, which is the same fundamental approach used by Git, GNU diff, and virtually every professional diff tool. LCS finds the longest sequence of lines that appears in the same order in both texts, then marks everything outside that common sequence as added or removed. This produces minimal, accurate diffs that show only true differences.