Skip to content

Three-Way Text Merge & Conflict Viewer

Paste the common base, your version and the incoming version, then press Merge text. Independent line changes are combined into one result, and edits that touch the same lines are wrapped in conflict markers you can review before copying.

Runs locally in your browser
1Common base2Merge text3Merged text

Common baseBASE
Your versionOURS
Incoming versionTHEIRS
Merged text
Conflict details

    How to merge two text versions against a common base

    The workbench compares three plain-text blocks line by line: the common base both versions started from, your version and the incoming version. A change that only one side makes is taken into the result; when both sides rewrite the same region, both alternatives are kept inside a conflict block instead of one being guessed.

    The merged text appears next to three counters and a conflict list that names the output line and the base lines of every conflict. The comparison runs inside the page, so the text never leaves the browser, and Copy or Download hands the result to the next step of your workflow.

    1. Paste the common base into the first pane, your version into the second and the incoming version into the third. Windows CRLF and Unix line endings are both read, and long files can be pasted as they are.
    2. Press Merge text. Independent changes are already combined in the result, and every overlapping edit becomes a block between conflict markers.
    3. Read the counters under the result — Conflicts, Changed regions and Rows — and the Conflict details list, which says on which output line each conflict sits and which base lines it replaces.
    4. Resolve each conflict block by editing the merged text, or change an input and merge again. Clear empties the three panes, the result and the counters.
    5. Copy the merged text or download it as a .txt file. Leave Ignore trailing whitespace when comparing checked while indentation-only differences should not count as changes.

    What the merged text contains and where the tool stops

    How the line comparison works

    Each version is compared with the base through a longest-common-subsequence line diff. Regions changed by one side only are taken from that side; regions both sides changed are grouped into a single conflict block, so adjacent edits do not produce two competing markers. A change made identically on both sides, including deleting the same lines, merges without a conflict.

    The comparison is line-based, not character-based: a reworded line counts as a changed line and marker lines are inserted as whole lines. Because both versions are diffed against the same base, the two edit histories never need to know about each other.

    Conflict markers and the three counters

    A conflict block starts with a line reading <<<<<<< YOUR VERSION, followed by your lines, then ||||||| COMMON BASE with the original base lines, the separator =======, the incoming lines and the closing line >>>>>>> INCOMING VERSION. Everything outside the block is already merged text.

    The counters measure different things: Conflicts counts marked blocks, Changed regions counts the changed areas found in both comparisons, and Rows counts the lines of the merged output. A three-line file edited on two different lines reports two changed regions, zero conflicts and three rows; the same edit on a line both sides touch reports one conflict and nine rows, because the block keeps your line, the base line and the incoming line between four marker lines.

    Limits, local processing and review

    The diff matrix is built in the browser, so a comparison is refused when the base line count multiplied by either version’s line count passes four million line pairs. Two 2,000-line versions against a 2,000-line base merge in about half a second in Chrome; 2,010 lines are rejected with a message, and the previous result is cleared instead of being left on screen.

    Merging sends no network request, so the tool works offline and on text that must not reach a third-party service. The output tells you where the versions disagree, not which side is right: read every conflict block before the merged file goes into a build, a configuration or a document.

    Recent tools: