Compare files · Notepad++

How to Compare Two Files in Notepad++

Notepad++ does not compare files out of the box, but the ComparePlus plugin is a two-minute install and gives you a side-by-side diff with colours, navigation and moved-line detection.

Install the plugin

Open Plugins › Plugins Admin, tick ComparePlus (the maintained successor of the old Compare plugin), click Install and let Notepad++ restart. On 64-bit Windows make sure you are running the 64-bit Notepad++; plugins must match the architecture.

Compare two open files

Open both files in tabs. With the second file active, press Ctrl+Alt+C (Plugins › ComparePlus › Compare); the old Compare plugin used Alt+D. The two tabs are placed side by side: added lines in green, removed in red, changed in orange with the differing characters highlighted, and a grey placeholder where one side has nothing.

Ctrl+Alt+C              Compare the two most recent tabs
Ctrl+Alt+X              Clear the active comparison
Ctrl+Alt+PgDn / PgUp    Next / previous difference
Ctrl+Alt+Home / End     First / last difference

Useful options

ComparePlus › Settings lets you ignore spaces, ignore case, ignore empty lines and detect moved blocks so a reordered function is not shown as a delete plus an add. Compare to last save diffs the current buffer against the file on disk, which is a fast check before you overwrite something.

When Notepad++ is not the right tool

For folders, use WinMerge. For files in a Git repository, git diff or VS Code shows history as well. For text that is not saved anywhere, or on a machine without Notepad++, paste both versions into the online diff checker.

Compare two texts online Paste both versions. Runs in your browser, nothing is uploaded.

FAQ

Why is the Compare plugin missing from Plugins Admin?

The original Compare plugin was replaced by ComparePlus. Search for ComparePlus; if Plugins Admin is empty, your Notepad++ was installed without it, so download the plugin release and drop the folder into plugins manually.

Can Notepad++ compare two folders?

No. Use WinMerge or, from a command prompt, robocopy src dst /L /E to list differences.