Three Way Text Merge

Three Way Text Merge

Combine two edits using their common base. Independent changes merge automatically; overlapping alternatives remain visible until you choose.

Common base

0 lines · 0 bytes · LF 0 / CRLF 0 / CR 0 · final newline absent · BOM absent

Left edit

0 lines · 0 bytes · LF 0 / CRLF 0 / CR 0 · final newline absent · BOM absent

Right edit

0 lines · 0 bytes · LF 0 / CRLF 0 / CR 0 · final newline absent · BOM absent

Each input: 256 KiB and 2,000 lines. Up to 400 conflicts. Output: 1 MiB. UTF-8 text only; an empty file is valid.

Line endings, whitespace and case are significant. File loading retains line endings; editing a textarea may normalize them to LF. The counts above reflect the stored input.

Try actual merge examples

Prepare the common base and both edits. Any of them may be empty.

Comments & questions

Three Way Text Merge

A two-way comparison shows differences; a three-way merge uses a shared base to identify which side changed each region. This tool combines independent edits and preserves overlapping alternatives for your decision. It works on complete lines, including their line endings, and keeps a record of the choices made for each conflict.

Key features

  • Common-base line comparison for two independently edited versions
  • Automatic independent edits and deduplication of identical changes
  • Conservative conflicts for overlaps and insertion/deletion boundaries
  • Base, left, right or custom resolution for each conflict
  • Ordered choice history with custom-text snapshots and reopening
  • UTF-8 TXT export after all conflicts are resolved, with explicit newline options

How to use

  1. Paste or load UTF-8 text into the common base, left and right panels. Empty texts are allowed.
  2. Run the merge and review automatic regions, duplicate changes and conflicts.
  3. For each conflict, choose a version or edit and apply custom text. Reopen any choice to revise it.
  4. Review the choice history and the complete merged text.
  5. Keep the selected line endings or explicitly normalize to LF/CRLF, then copy or download the resolved TXT.

Use cases

  • Combine independent edits to a small Markdown document using its last shared version.
  • Resolve conflicting settings-line changes while retaining identical changes only once.
  • Review a deletion next to a new line before choosing its intended ordering.
  • Preserve mixed line endings or intentionally normalize a completed merge.

Frequently asked questions

Why is a common base needed?

The base is the version from which both sides were edited. A change made on only one side can be applied automatically. When both sides change the same region differently, the tool preserves their alternatives as a conflict. An unrelated base can produce unintuitive alignment, especially around repeated lines.

What merges automatically and what becomes a conflict?

Different nonoverlapping lines merge automatically, and identical changes appear once. Adjacent nonempty edited ranges are independent. Different insertions at one position, overlapping replacements, and insertions touching the start or end of an edited range are conservatively grouped for review. It does not guess an ordering for conflicting insertions.

Are spaces, case and final newlines significant?

Yes. Comparisons are exact and include each line’s terminator. LF, CRLF, CR, a missing final newline, tabs, spaces and letter case can all be edits. UTF-8 file loading preserves a BOM and line endings. Editing in a browser textarea may normalize its line endings to LF; the panel’s counts show the currently stored text.

How does custom conflict text work?

Apply custom text to replace only the selected conflict region. Empty custom text deletes that region. If a later region can contain text, nonempty custom text must end in a line break so it cannot silently join the following line. The Add line break button provides one. Editing a draft reopens that conflict until you apply a choice again.

Can I download a partially resolved file?

No. Copy and TXT export stay disabled while any conflict is unresolved. The tool does not silently choose a side or export conflict markers as a completed merge. After resolution, a deliberately empty result can be downloaded as an empty file. The history records choices, reopening and custom snapshots; resetting choices clears that history.

What are the limits and output newline options?

Each source and custom fragment is limited to 256 KiB and 2,000 lines. At most 400 conflicts and 2,000 choice events are supported, with 1,048,576 stored custom-history characters. Output is limited to 1 MiB. Preserve keeps selected terminators; LF/CRLF explicitly converts all terminators. An optional final line break is added only to a nonempty result that lacks one. This is a line merge, not a syntax or meaning validator.

Privacy

The base, edited versions, custom resolutions and choice history stay in the current page’s browser memory. This tool does not upload text, place it in URLs or analytics events, or automatically save it in browser storage. Copy and TXT download happen only when you request them. Changing a source discards its merge plan and choices.

Related Tools

Text DiffFind & ReplaceText CleanerDOCX Style AuditorCitation ManagerDocument Search IndexSigned PDF InspectorPDF/A Archival PreflightPrint Preflight AuditorSearchable Scan PDF MakerPublication Accessibility AuditorResearch Evidence MatrixPDF Form DesignerPDF Annotation StudioPDF Object InspectorPDF Outline EditorEPUB Authoring WorkbenchDocument Version ComparatorBooklet Imposition DesignerSensitive Text RedactorHanja Reading WorkbenchGrammar Production LabDialogue Script EditorBook Index BuilderBilingual QA CheckerText Diagram EditorANSI Art StudioEmail Thread ExplorerPDF Redaction StudioRich Text SanitizerFixed Width Record DesignerPresentation Rehearsal StudioText Tokenization LabKorean & English Braille ConverterText to SpeechTyping speed testKorean Text Pattern ReviewKorean Spelling QuizFont Preview and ComparisonHTML to MarkdownMojibake RepairSort LinesReverse TextRoman Numeral ConverterHangul Jamo ConverterKorean Initial ConsonantsAdd or Remove Line NumbersNumber to Korean WordsMorse Code ConverterROT13 & Caesar ConverterURL Slug GeneratorHTML Tag RemoverEmoji CollectionCharacter CounterUnit ConverterFile Size ConverterColor Code ConverterPDF Merge/SplitBusiness Day CalculatoriCalendar Rule LabvCard Address Book EditorJPG to PDFKorean Name RomanizerOrganize PDF PagesFancy Font GeneratorContrast CheckerColor Palette GeneratorPDF to JPGLorem Ipsum GeneratorText Template WorkbenchKorean-English Typo ConverterOnline NotepadWord Cloud GeneratorPDF UnlockEnglish Address ConverterPDF Compressor
Explore all Text/Convert tools →Image/Media →Life/Fun →Dev Tools →