Diff Merger
3-way text merge: Base + Left + Right → merged output with conflict detection
Base (Original)
Left Version
Right Version
Merged Result
About the Three-Way Diff and Merge
This three-way merge tool compares a common base against two independently edited versions. Changes that touch different lines combine automatically, while genuine conflicts — the same line edited both ways — are flagged for you to resolve.
A three-way merge is what you need when two people edited the same document from the same starting point. A plain two-way comparison cannot tell you which side changed a line, because it has no record of what the line said originally.
Adding the base version resolves that. If only one side touched a line, that side's version is obviously the intended change and can be taken automatically. If both touched the same line differently, that is a real conflict requiring a human decision — and this is exactly the model git uses when it reports a merge conflict.
Useful beyond code: two reviewers editing the same policy document, a translation updated while the source also changed, or a config file modified on two servers. Everything runs in your browser.
How to use the Three-Way Diff and Merge
- Paste the base version. Provide the common original both copies started from.
- Paste the two edited versions. Add the left and right variants.
- Review the conflicts. Non-overlapping changes merge automatically; overlaps are flagged.
- Resolve and copy. Choose a side for each conflict and copy the merged result.
Three-Way Diff and Merge features
- Three-way merge from a common base plus two edited versions
- Non-overlapping changes combined automatically
- Conflicting lines flagged rather than silently resolved
- Changes highlighted by which side they came from
- Copy the merged result or download it
- Runs in your browser; nothing is uploaded
Frequently asked questions
What makes a merge three-way?
The common ancestor. With the original plus both edited versions, the tool can tell an addition from a deletion — something impossible when comparing two files alone, where it cannot know which side changed.
How are conflicts handled?
They are flagged for you rather than guessed at. When both versions changed the same line, only you know which one is right, so the tool marks it and leaves the decision alone.
When is this better than a normal diff?
When two people edited the same document from the same starting point and you need one combined result — the situation version control handles for code and nothing handles for a plain document.
Can I use it on source code?
Yes, it is line-based so code works fine. For anything already in Git, the built-in merge is better because it knows the real ancestry; this is for files that were never under version control.