How to use

Get started in seconds

TextFileCompare.com is designed to be self-explanatory, but here's a full walkthrough of every feature.

1

Enter or paste your text

Type or paste the original content into the left editor ("Original") and the modified content into the right editor ("Modified"). Both panels support full keyboard editing including undo, redo, and search.

2

Upload files

Click ↑ Upload left or ↑ Upload right in the per pane buttons to load a file directly from your device. You can also drag and drop any file straight onto the left or right panel the panel will highlight when ready to receive a file.

The tool automatically detects the language from the file extension. Supported formats include: .txt, .js, .ts, .html, .php, .py, .css, .json, .xml, .sql, .yaml, .sh, .java, .cpp, .md, and more.

Note on swap: When you click ⇄ Swap, both the text content and the file names swap between panels so you always know which file is on which side.

3

Choose your language and options

The language is detected automatically. To override, use the Language dropdown in the toolbar. Then set your comparison preferences in the stats bar:

  • Word diff : highlights individual words or characters that changed (great for prose or config values).
  • Inline : switches to a unified single-column view with + / − line markers.
  • Collapse : hides unchanged lines so you can focus on just the diffs.
  • Auto : re-runs the comparison automatically as you type.
4

Run the comparison

Click Compare → or press Ctrl+Enter. The tool uses the Google diff-match-patch algorithm for fast, accurate comparison. Additions are highlighted in green, removals in red. The stats bar shows the number of differences found and how long it took.

Click Exit compare to return to editing mode at any time.

5

Navigate diff chunks

After comparing, use the ▲ Prev and ▼ Next buttons in the toolbar to jump between individual diff chunks one at a time. Both panels scroll in sync to keep the change in view. You can also use Alt+↑ and Alt+↓ as keyboard shortcuts for hands-free navigation.

6

Search and find & replace

Click Search in the toolbar (or press Ctrl+F) to open the search bar. Matches are highlighted across both panels simultaneously as you type. Use the ▲ / ▼ arrows or Enter / Shift+Enter to step through results. Options include case-sensitive matching and full regex support.

Expand the search bar to reveal Find & Replace. Click inside the panel you want to target, then use Replace to swap the current match or Replace all to replace every match in that panel at once.

Press Escape to close the search bar and clear all highlights.

7

Merge changes

  • Merge → : copies the left panel's content into the right panel.
  • ← Merge : copies the right panel's content into the left panel.
  • Smart merge : applies a diff-patch merge from left into right, preserving as much original content as possible.

The merged result is fully editable and can be saved or exported.

8

Export and download

Open the More ▾ menu to access export tools:

  • Export patch — downloads a standard unified diff .patch file.
  • HTML report — saves a styled, self-contained HTML diff report.
  • Copy diff — copies the diff to your clipboard.
  • Save left / Save right — downloads the respective panel content as a text file (original filename preserved).
9

Line wrap & font size

Click Wrap ↵ in the toolbar to toggle line wrapping on or off across both panels and the merge view. Your preference is saved for the session. Use A+ and A− to increase or decrease the editor font size (10px–22px), also saved across refreshes.

10

Keyboard shortcuts

Press ? anywhere on the tool page to open the full shortcut reference. All shortcuts are listed below:

Ctrl+Enter Compare
Ctrl+Shift+L Clear all
Ctrl+S Swap panels
Ctrl+F Open search
Ctrl+U Upload left
Ctrl+D Download left
Ctrl+Z Undo
Ctrl+Y Redo
Alt+↓ Next diff chunk
Alt+↑ Prev diff chunk
Alt+W Toggle line wrap
Ctrl+Alt+→ Merge → right
Ctrl+Alt+← Merge ← left
Enter Next search match
Shift+Enter Prev search match
Escape Close search / modal
? Shortcut reference
11

Dark mode & session persistence

Toggle dark mode with the ☀/🌙 button in the top right corner. Your theme preference is saved and applied immediately on every visit no flash of wrong theme.

Your text content, file names, language selection, and toggle settings are automatically saved in your browser's session storage. Refresh the page and everything is restored exactly as you left it.