Free Text Diff & Merger
Compare two texts side by side, highlight differences, and merge them together seamlessly. Free, fast, and works entirely in your browser with no sign-up required.
Updated
Text Diff & Merger
Compare texts, visualize differences, and merge with conflict resolution. Supports 2-way and 3-way merge with multiple strategies.
Compare two texts directly.
Original (Left)
Modified (Right)
About Text Diff & Merger
Compare two or three versions of text, see differences highlighted with syntax coloring and word-level inline diffs, and merge them with full conflict resolution. Supports undo/redo, custom edits, session history, multiple merge strategies, keyboard shortcuts, and export as patch, conflict markers, or conflict report.
- Green (+): Added lines
- Red (-): Removed lines
- Yellow (!): True conflict
- Cyan: Auto-mergeable
- Blue: Resolved conflict
- highlighted: Changed words
- Left: Keep left version
- Right: Keep right version
- Both: Include both versions
- Custom: Write your own merge
- Per-line: Accept/reject each line
- Unresolve: Revert a resolution
- Manual: Resolve each conflict
- Auto: Auto-merge non-conflicting
- Take Ours: Always use left
- Take Theirs: Always use right
- Auto-resolve Safe: 3-way only
- 2-way and 3-way merge
- Word-level inline diffs
- Auto-mergeable detection
- Keyboard shortcuts
- Undo/redo (up to 50 steps)
- Conflict map navigation
- Custom text for conflicts
- Export patch, markers, report
- Save/load sessions
- Swap sides
- Configurable context lines
Frequently Asked Questions
What is the Text Diff & Merger?
The Text Diff & Merger is a free online tool that compares two texts, highlights differences, and lets you merge them together.
Is the Text Diff & Merger free?
Yes, it is completely free with no registration required. All comparison and merging happens client-side in your browser.
Does it store my text data?
No, the Text Diff & Merger processes everything locally in your browser. No data is sent to any server.
Does the Text Diff & Merger work on mobile devices?
Yes, the Text Diff & Merger is fully responsive and works on smartphones and tablets. You can use it on any device with a modern web browser -- no app download required.
Do I need to create an account to use this tool?
No account or registration is needed. Simply open the Text Diff & Merger in your browser and start using it immediately. There are no sign-up walls or usage restrictions.
Can I process large amounts of text?
Yes, the Text Diff & Merger handles text of any length with fast, real-time processing. Since everything runs in your browser, performance depends on your device but works well for most use cases.
How do I use the Text Diff & Merger?
Simply enter your input in the provided field, adjust any settings to your preference, and the tool will process it instantly. You can then copy the result to your clipboard or download it.
Which browsers are supported?
The Text Diff & Merger works in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. For the best experience, use the latest version of your preferred browser.
What is the difference between two-way and three-way merge?
A two-way merge compares just two versions of your text — an original on the left and a modified version on the right — and shows every line that was added or removed between them. It works well when you only have two copies and want to reconcile them by hand. A three-way merge adds a third input: the common base, meaning the shared ancestor both versions started from. With that base, the tool can tell whether only one side changed a line — which is safe to apply automatically — or whether both sides edited the same line, which is a true conflict that needs your decision. This is the same model version-control systems use, and it produces far cleaner results when two people edited the same paragraph independently. Pick three-way mode in the tool above whenever you have that original base text available.
How does the tool decide whether a change is a conflict or can be merged automatically?
The tool diffs your text line by line and labels each line as unchanged, added, or removed. When a removed line and an added line sit next to each other, it treats that pair as a potential conflict and runs a word-level diff inside it to show exactly which words moved. In two-way mode you resolve those pairs yourself. In three-way mode, with the common base supplied, it goes further: if only one version changed a given line, that edit is safe to apply automatically; if both versions changed the same line differently, it is flagged as a real conflict that needs a human choice. The auto-merge strategy applies all the non-conflicting changes for you and leaves only the genuine conflicts to settle. Choose your merge strategy in the tool above to control how much it resolves on its own.
What does the similarity percentage mean in a text diff?
The similarity percentage is a quick measure of how alike your two versions are, calculated as the share of lines that match between them. If 90 out of 100 lines are identical, you will see roughly 90 percent similarity, signalling a light edit; a number closer to 40 or 50 percent means the two versions diverged heavily. It sits in the same panel that reports lines added, lines removed, lines unchanged, and the number of conflicts found, so you get an at-a-glance sense of the scope of a change before you start resolving anything. It is a line-level figure, not a character-level score, so reordering words within a line still counts that line as changed. Paste both versions into the tool above to see your similarity score and counts update instantly.
How do I export a merged file with git-style conflict markers?
When you finish working through a comparison, the tool offers three download formats. Alongside the finished merged text and a unified-diff patch, you can export a git-style file that wraps any unresolved disagreements in the familiar conflict markers — the rows of less-than signs, equals signs, and greater-than signs that surround the left and right versions. This is handy when you would rather settle certain conflicts in your own editor or commit the file into a repository and resolve it there. The tool also produces a separate conflict report listing each conflict and how it was settled, which is useful for review trails. Resolve what you can in the tool above, then choose the conflict-marker download to take the rest elsewhere.
What is the difference between a line-level diff and a word-level diff?
A line-level diff compares your text one whole line at a time, marking each line as added, removed, or unchanged. It is fast and easy to scan, but when a single word changes inside a long line, the entire line shows as removed-and-added even though most of it is identical. A word-level (or inline) diff drills into that pairing and highlights only the specific words that actually differ. This tool combines both: it diffs by line for the overall structure, then, wherever a removed line and an added line are paired into a conflict, it runs an inline word-level diff so you can see precisely which words moved within that line. You can toggle the inline word highlighting on or off in the tool above depending on how much detail you want while reviewing.
Related Tools
Free Word Counter Online
Count words, characters, sentences, paragraphs, and reading time instantly. Free online word counter tool. Works entirely in your browser with no sign-up required.
Free Text Case Converter Online
Convert text to uppercase, lowercase, title case, or sentence case. Free online case converter. Works entirely in your browser with no sign-up required.
Free Lorem Ipsum Generator
Generate placeholder Lorem Ipsum text for design and development projects. Free, fast, and works entirely in your browser with no sign-up required.
Free Duplicate Line Remover
Remove duplicate lines from your text while preserving order. Free online tool. Works entirely in your browser with no sign-up required.
About the Text Diff & Merger
The Text Diff & Merger compares two versions of a piece of text, highlights exactly what changed line by line, and helps you combine them into a single clean result. Paste an original version on the left and a modified version on the right, and the tool lines them up, marks every added and removed line, and pinpoints the spots where the two genuinely conflict. It is built for anyone who keeps ending up with two copies of the same document: writers reconciling edits from a co-author, developers eyeballing a code change outside their IDE, and students checking what a reviewer altered.
Everything runs in your browser. The text you paste is compared and merged on your own device using JavaScript, and nothing is uploaded to a server. There is no sign-up, no length cap beyond what your hardware can handle, and your drafts, contracts, or unreleased code stay private. Saved merge sessions are kept in your browser's local storage, not on any remote account.
How the diff and merge work
The tool diffs your text by lines. Each line is classified as one of three things: unchanged, added, or removed. Where a removed line and an added line sit next to each other, it pairs them into a conflict and runs an inline word-level diff so you can see exactly which words moved within that line, not just that the whole line changed. A running panel reports the counts — lines added, removed, unchanged, conflicts found, and a similarity percentage calculated as the share of lines that match between the two versions.
You then build the merged output by resolving each conflict. For every conflict you can:
- Accept Left to keep the original line
- Accept Right to take the modified line
- Accept Both to keep both versions stacked
- Enter custom text to write a hand-tailored line that replaces both sides
A live merge preview updates as you make decisions, so the final result is always visible while you work.
Two-way and three-way merging
The tool supports two modes. In two-way mode you compare an original and a modified version directly. In three-way mode you also supply a common base — the shared ancestor both versions were derived from. With that base in place the tool can tell the difference between a change only one side made (safe to auto-apply) and a change both sides made to the same line (a true conflict that needs a human decision). This is the same model version-control systems use, and it is what makes a clean merge possible when two people edit the same paragraph independently.
Several merge strategies are available: resolve everything manually, auto-merge the non-conflicting changes and leave only the real conflicts, or take one side wholesale with "ours" or "theirs." For quick passes you can also accept or reject all changes at once.
Reviewing, navigating, and exporting
For larger documents the tool adds review aids that make conflicts manageable. A conflict map shows every disagreement at a glance and lets you jump straight to the next unresolved one. Keyboard shortcuts speed up the work — J and K move between conflicts, Alt+1/2/3 accept left, right, or both, and Ctrl+Z / Ctrl+Shift+Z undo and redo your decisions. You can view the comparison either unified or side by side, toggle inline word highlighting, and set how many lines of unchanged context show around each change.
When you are done you can copy the merged result to your clipboard or download it three ways: the finished merged text, a unified-diff patch, or a git-style file with <<<<<<< / ======= / >>>>>>> conflict markers for anything you would rather resolve elsewhere. A separate conflict report lists each conflict and how it was settled, and you can save a session to your browser to pick the merge back up later.