You Might Also Like
Free Diff Checker Online — Compare Text, Code & Files Side by Side
About this tool
Free Online Diff Checker & Text Comparison Tool
Diff Checker is a free browser-based text comparison tool that uses the LCS (Longest Common Subsequence) algorithm to highlight exactly what changed between two pieces of text — line by line and character by character. The same core algorithm powers Git, GNU diff, and every major version control system in use today. A diff is the standard way software developers track changes: it shows additions in green, removals in red, and unchanged lines in gray, making the evolution between any two text versions immediately clear without reading every line. This tool supports three display modes — Split view for side-by-side comparison, Unified view for the standard +/- patch format, and Inline view for character-level change highlighting within modified lines. It handles any plain text content including source code, configuration files, JSON payloads, SQL scripts, Markdown documents, prose writing, and log output. Beyond basic comparison, the tool includes a merge pane for manually combining changes, shareable diff URLs, and .patch file export. All processing is 100% client-side — your text never leaves your browser, making it safe for proprietary code or confidential documents.
Features
- LCS (Longest Common Subsequence) algorithm — the same engine used by Git and GNU diff
- Split view — side-by-side comparison with aligned line numbers
- Unified view — combined +/- diff format compatible with patch files
- Inline mode — character-level highlighting of exact changed characters within lines
- Previous / Next hunk navigation — jump between change blocks without scrolling
- Diff statistics — added, removed, and unchanged line counts at a glance
- Merge pane — manually accept, discard, or edit individual change hunks
- Shareable diff URLs — encode both panes in a link for team sharing
- Export as .patch file — standard unified diff format compatible with git apply
- 100% private — all computation runs in your browser, no text sent to any server
How to Use
Paste the original version of your text into the left input pane — labeled Version A or Original — and the modified version into the right pane labeled Version B or Modified. The diff updates automatically as you type or paste, showing changes highlighted in real time without any button press. Click the Split button in the toolbar to see both versions side by side with corresponding lines aligned, additions highlighted in green on the right, and removals in red on the left. Click Unified to collapse both texts into a single column showing lines prefixed with + for additions and − for removals — the same format you see in a git diff output. Click Inline to switch to character-level mode, which highlights only the specific characters that differ within each changed line rather than marking the whole line as different — this mode is essential for spotting typos, number changes, and single-word edits. Use the Previous and Next arrow buttons in the toolbar to jump between change hunks without scrolling manually through long texts. The stats bar below the toolbar shows a count of added lines, removed lines, and unchanged lines for a high-level summary of how much changed. Use the Merge pane to selectively accept or discard individual hunks and produce a reconciled final version. Click Share to get a shareable URL that encodes both panes, or click Export to download a standard .patch file.
Common Use Cases
Frequently Asked Questions
A diff checker compares two pieces of text and visually highlights exactly what was added, removed, and left unchanged between them. It processes the texts line by line to produce a diff — a list of change hunks showing which lines are new (additions), which were deleted (removals), and which are identical in both versions. Diff checkers are used daily by developers for code review, content editors for document comparison, DevOps engineers for config file auditing, and anyone who needs to understand exactly what changed between two versions of any text.
This tool uses the LCS (Longest Common Subsequence) algorithm — 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 the true differences rather than spurious changes caused by line reordering.
Three display modes are available. Split view shows the original text on the left and the modified text on the right with changes highlighted in place — ideal for reading and comparing side by side on wide screens. Unified view combines both texts into a single column with + and − prefix markers to distinguish additions and deletions — the standard format used in Git diffs and patch files. Inline mode applies character-level highlighting within each changed line, coloring the exact characters that differ rather than marking the whole line as changed — invaluable for spotting single-character typos, number changes, and small edits.
Character-level diffing goes beyond line-level comparison to highlight the specific characters that changed within a modified line. Without it, two lines that differ by only one character still appear as an entirely removed line and an entirely added line, making the actual change hard to spot. With inline character-level mode, the identical parts of the line are shown normally while only the changed characters are highlighted in color — making it immediately obvious that only a single word, number, or symbol changed.
Yes. The diff checker works with any plain text content — JavaScript, TypeScript, Python, CSS, HTML, JSON, YAML, SQL, Markdown, shell scripts, configuration files, prose documents, log entries, or any other text format. Simply paste the two versions of your code or file content into the left and right panes. The tool does not require file upload — paste directly from your editor or terminal, which also ensures your private code never touches any server.
Yes. All diff computation runs entirely in your browser using JavaScript — your text is never transmitted to any server at any point during or after comparison. This makes the tool safe to use with proprietary source code, confidential documents, API keys in config files, database credentials, or any other sensitive text content. Closing the browser tab permanently discards everything you pasted, with no logging or storage on any backend.
Yes. The merge pane lets you manually edit and selectively combine changes from both sides. You can accept individual hunks from either the left or right version, edit the merged result directly, and produce a final reconciled version. This is useful when you have two diverged versions of a document or code file and need to manually resolve which changes to keep from each side — similar to resolving a merge conflict in a version control system.
Yes. Click Share to generate a URL that encodes both text panes — share this link and anyone who opens it will see the exact same diff without needing to paste the content again. Click Export to download a standard unified diff as a .patch file compatible with git apply, patch, and other standard Unix patching tools. The stats bar at the top summarizes the total count of added lines, removed lines, and unchanged lines for a quick overview of the diff size.