Diff Merger

3-way text merge: Base + Left + Right → merged output with conflict detection

Base (Original)

Left Version

Right Version

7 lines1 left4 right1 conflicts

Merged Result

🔵 Left 🟢 Right 🔴 Conflict
1Hello World
2LThis is line 2 (edited by left)
3RThis is line 2
4RThis is line 3 (edited by right)
5RThis is line 4
6RCommon ending
7Added by left

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

  1. Paste the base version. Provide the common original both copies started from.
  2. Paste the two edited versions. Add the left and right variants.
  3. Review the conflicts. Non-overlapping changes merge automatically; overlaps are flagged.
  4. Resolve and copy. Choose a side for each conflict and copy the merged result.

Three-Way Diff and Merge features

  • Three-way merge
  • Conflict resolution
  • Multiple view modes
  • Change highlighting
  • Export merged result
  • Version control

Frequently asked questions

How does diff merge work?

Compares two or three text versions, highlights differences, and helps merge changes into a final version.

Can I merge conflicting changes?

Yes! Shows conflicts and allows you to choose which changes to include in the merged result.

What comparison views are available?

Offers side-by-side, unified, and three-way comparison views for different merge scenarios.