Git Conflict Remover
Resolve Git merge conflicts in pasted code. Parses <<<<<<<, =======, >>>>>>> (and optional diff3 |||||||) markers and rewrites every conflict block by keeping ours, theirs, both sides, or neither — removing all markers.
Input
Output
Guides
Git Conflict Remover
The Git Conflict Remover cleans up merge-conflict markers left behind by Git. Paste code that contains <<<<<<<, =======, and >>>>>>> lines, choose which side of every conflict to keep, and get back a clean file with all markers stripped out. It handles many conflict blocks at once and preserves every non-conflicted line exactly as you wrote it.
What a merge conflict looks like
When Git can't automatically reconcile two branches, it wraps the disputed region in markers:
<<<<<<< HEAD
your version (ours)
=======
the incoming version (theirs)
>>>>>>> feature-branch
The section above ======= is ours (usually your current branch, HEAD); the section below it is theirs (the branch being merged in). The tool also understands the optional diff3 ||||||| marker, which Git inserts to show the common ancestor — that ancestor block is informational, so it is discarded whichever side you keep.
How to use it
- Paste the conflicted code into the input box, or drag in a file.
- Pick a resolution mode:
- Ours — keep the current-branch version, drop the incoming one.
- Theirs — keep the incoming version, drop the current one.
- Both sides — concatenate ours followed by theirs (handy when both changes belong in the file).
- Neither — remove the markers and both sides, leaving an empty region you can rewrite by hand.
- Copy or download the resolved output.
The same mode is applied to every conflict block in the input, which makes it fast to clear a file with dozens of conflicts. If you need different decisions per block, resolve the file in passes or edit the output directly.
Why not just delete the markers manually?
Deleting seven-character marker lines by hand is where mistakes creep in — a stray ======= left behind breaks the build, and it's easy to keep the wrong side. This tool parses the block structure instead of doing a blind find-and-replace, so markers are always removed as complete units and your real code is never touched.
Is my code private?
Yes. The tool runs entirely in your browser. Nothing you paste is uploaded, logged, or sent to a server, so it is safe for proprietary or internal code.
Frequently asked questions
Does it work with any language? Yes. Conflict markers are plain text lines, so the tool is language-agnostic — JavaScript, Python, JSON, YAML, Markdown, or anything else.
What about malformed markers? An opening marker with no matching separator or closing marker is left in place rather than guessed at, so you can spot and fix it.
Can I keep both changes? Choose the Both sides mode to output ours immediately followed by theirs.
Use it from code
From 3 credits per callREST API
curl -X POST https://api.iotools.cloud/v1/tool/git-conflict-remover \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "ours",
"inputText": "function greet() {\n<<<<<<< HEAD\n return \"Hello …"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `git-conflict-remover` tool (Git Conflict Remover) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.