How to Use DiffMergy
A complete visual guide to mastering every feature of the platform
1. Code Compare
Open the Compare Tool
Navigate to Code Compare from the main menu or visit diffmergy.com directly. The compare tool is the flagship feature of DiffMergy.
Add Your Code
Paste your baseline code in the Original editor and the modified version in the Modified editor. You can also upload files directly or fetch code from a URL.
Select Language & Compare
Choose your programming language from the dropdown (30+ supported), set your indent preference, and click Compare or press Ctrl+Enter.
Review & Merge
Navigate between changes using the prev/next arrows (F2 / Shift+F2). Accept or reject each change individually, or use Accept All / Reject All. The merged result appears in the right panel.
2. View Modes
Side-by-Side View
Default view showing original and modified code next to each other. Ideal for understanding context around changes.
Unified View
Single-column diff view similar to git diff. Best for reviewing changes in a compact format or exporting patches.
Changes Only Filter
Toggle Changes Only to hide unchanged lines and focus solely on additions, removals, and modifications.
3. Keyboard Shortcuts
4. Save & Share Sessions
Save Session
Click Save to store your current comparison in your browser's local storage. Sessions are saved automatically every 30 seconds and before the page closes.
Load Session
Click Load to restore a previously saved session. All code, language settings, and diff decisions are preserved.
Share Link
Click Share to generate a URL-encoded link that contains both code snippets. Share it with teammates for instant comparison without any server storage.
5. Other Tools
Code Review
Upload source files or entire folders to get instant static analysis: code smells, security vulnerabilities, refactor suggestions, and a health score. Try Code Review →
Security Scan
Paste any code to detect XSS, SQL injection, hardcoded secrets, eval() usage, and other OWASP vulnerabilities. Try Security Scan →
Developer Utilities
JSON/YAML tools, regex tester, encoding/decoding, hash generators, JWT decoder, password generator, minifier, and more. All browser-based, no server required. Explore all tools →
6. Tips for Best Results
Use Language Selection
Always select the correct language for your code. This enables syntax highlighting in the preview panel and improves diff accuracy for language-specific structures.
Ignore Whitespace
Enable the Ignore Whitespace option when comparing code that may have different indentation styles. This prevents false-positive changes from showing up.
Use the Minimap
The diff minimap in the bottom-right of the diff panel gives you an overview of where changes are concentrated in large files. Click to jump to a specific region.
Export Patches
Use the Export .patch button to download a standard unified diff file that can be applied with git apply or patch command.