Documentation

Text compare

Two text files side by side, with changed lines and changed words highlighted. You can edit either side, copy differences across and save, and DiffScope keeps each file's encoding and line endings.

Applies to DiffScope v1.0.1 Updated Oct 2026

The layout

DiffScope text compare: two versions of a file side by side with changed words highlighted and an overview strip on the right DiffScope text compare in the light theme
Left and right panes, the copy gutter between them, and the overview strip on the right.
Pane headers
The file name (or the title passed on the command line), the full path, and badges for the encoding, the line endings and the line count. A dot appears when a side has unsaved edits, and a lock when it is read-only.
Two panes
Left and right scroll together, vertically and horizontally. Lines that exist on one side only get an empty filler row on the other side, so matching lines stay level.
Highlighting
Changed lines are tinted. Within a changed line, the words that differ are highlighted. When two lines have almost nothing in common, only the line tint is shown, because word highlighting would just be noise.
Copy gutter
The strip between the panes shows each difference, with arrow buttons that copy it to the right or to the left.
Overview strip
The column on the far right maps every difference in the file. Click or drag in it to jump.
Status bar
"Difference 3 of 12", counts of changed blocks and of left-only and right-only lines, the ignore options in effect, and each side's encoding and line endings.

The current difference has an outline. DiffScope selects the first one when the files open.

  • F7 or Alt+↓ goes to the next difference. Shift+F7 or Alt+↑ goes to the previous one. The toolbar arrows do the same.
  • Click any changed line to make its block the current difference.
  • Ctrl+Home and Ctrl+End go to the top and the bottom of the files.

When the files match, a message says so. If only the encoding or the line endings differ, the status bar says Text identical — encoding or line endings differ.

Ignore options

The Ignore controls in the toolbar re-run the comparison at once:

ControlEffectCommand line
No whitespaceWhitespace counts (default).--ignore-whitespace=none
All whitespaceIgnores every space and tab.-w
Leading/trailingIgnores whitespace at the start and end of lines.--ignore-whitespace=leading-trailing
Whitespace changesTreats runs of whitespace as equal, like git diff -b.-b
Ignore case (Aa button)Upper and lower case compare equal.-i
Ignore blank linesInserted or removed empty lines are not differences.-B

Ignored differences are still shown in the text. They are just not counted or highlighted as differences. Options passed on the command line are already set when the window opens.

Editing in place

Double-click a line to edit it. A single-line editor opens over the line, and the comparison updates as you type.

  • Enter splits the line at the cursor.
  • Backspace at the start of a line joins it to the line above. Delete at the end joins the next line.
  • ↑, ↓, Page Up and Page Down move the editor to another line and keep the column.
  • Tab inserts a tab character. Esc closes the editor.
  • Double-click an empty filler row to type a new line at that position.

Undo with Ctrl+Z and redo with Ctrl+Y (or Ctrl+Shift+Z). The history covers both sides and block copies. While the line editor is open, these keys work on the text in the editor instead.

Copying differences

To make one side match the other for a single difference:

  • Press Alt+→ to copy the current difference to the right, or Alt+← to copy it to the left.
  • Or click the arrow buttons for that difference in the gutter between the panes.

The copied lines replace the block on the other side, line endings included. Each copy is one undo step.

Saving

Ctrl+S saves every side that has unsaved edits. DiffScope writes each file back in its original format:

  • Encoding. UTF-8, UTF-8 with BOM, UTF-16 LE and BE (with or without BOM) are kept as they were. Files that are not valid UTF-8 are read and written as ANSI (Latin-1), byte for byte. If you type a character that Latin-1 cannot hold, DiffScope saves as UTF-8 instead and tells you.
  • Line endings. Every line keeps its own ending (CRLF, LF or CR), so a file with mixed endings stays mixed. A missing newline at the end of the file stays missing. New lines you add get the file's main line ending.

F5 reloads both files from disk. If you have unsaved edits, DiffScope asks first. If you close the window with unsaved edits, it offers Save, Don't Save or Cancel.

Swap sides in the toolbar exchanges left and right, including their edits and read-only state.

Read-only sides

A read-only side shows a lock in its header. You cannot edit it, nothing can be copied into it, and its copy buttons are hidden. Set it from the command line:

SwitchMakes read-only
/leftreadonly, --left-readonlyThe left side
/rightreadonly, --right-readonlyThe right side
/readonly, /ro, --readonly, -rBoth sides

The TortoiseGit and git setups in Integrations make the left side read-only, because it is usually a temporary copy of an older revision.

DiffScope.exe old\config.json new\config.json /leftreadonly /title1:"Release 1.4" /title2:"Working copy"

Large files

Only the rows on screen are drawn, so files with hundreds of thousands of lines scroll smoothly. Very long lines are cut off on screen after 8,000 characters, with a note saying how many characters are hidden. The file itself is not changed.