How to Use TextFileCompare.com
TextFileCompare.com is a free online tool to compare two text files or code blocks side-by-side. Whether you're reviewing code changes, checking document versions, or merging config files, here’s how to use the tool effectively:
1 Enter or Paste Text
- Type or paste the original content into the left editor.
- Paste or type the modified content into the right editor.
- Live line count indicators update below each panel.
2 Upload Files
- Use the Choose File buttons to upload files (
.txt,.js,.html,.php,.css, etc.). - Click Upload to load them into the comparison interface.
- Language detection is automatic based on file extension or content.
3 Select Comparison Options
Auto‑Compare: Runs the diff automatically when text changes.
Word‑Level Diff: Highlights added or removed words inline.
Mode: Override auto-detection if needed.
4 Run Comparison & Merge
Compare: Shows the line-by-line visual diff.
Close Diff: Hides the comparison panel.
Swap Texts: Switches left and right editors (disabled if any side is empty).
Smart Merge: Automatically merges with visible conflict blocks like Git.
Undo Merge: Revert the last Smart Merge result.
5 Export & Download
- Download: Saves the left panel as
merged.txt. - Export: Generate unified diff (patch) or HTML output.
- Copy: Use "Copy Diff" from the "More" menu to copy to clipboard.
6 More Tools & Shortcuts
- Undo/Redo: Use buttons or Ctrl+Z, Ctrl+Y.
- Search: Locate keywords across both panels.
- Collapse Identical Lines: Hides unchanged blocks for clarity.
- Font Size: Adjust using A+ / A– for better readability.
- Inline View: Toggle between side-by-side and inline diff.
7 Dark/Light Theme
Toggle the theme from the top-right switch. The editor and diff colors will auto-adjust and remember your preference.
8 Keyboard Shortcuts
- Ctrl + Enter: Compare
- Ctrl + L: Clear All
- Alt + ← / →: Merge Left/Right
- Ctrl + S: Swap Texts
- Ctrl + U: Upload
- Ctrl + D: Download
- Ctrl + Z: Undo
- Ctrl + Y: Redo
9 Session Persistence
Text, mode, and preferences are automatically saved in your browser. Refresh or return later to continue from where you left off.
TextFileCompare.com