Windows · Guide

How to Edit and Compare Text Files with Notepad++

Short answer

Install Notepad++, then add the Compare plugin from Plugins > Plugins Admin. Open both files, press Alt + D, and differences are highlighted line by line in a side-by-side view.

Requirements

  • Windows 11 or Windows 10
  • Notepad++ (free, open source)
  • The Compare plugin, installed from Plugins Admin
  • Two files of the same type to compare

Steps

  1. 1. Install Notepad++ from the official site

    Download the installer from notepad-plus-plus.org. The 64-bit build is the right choice on any current Windows PC, and plugin availability is now equivalent.

  2. 2. Add the Compare plugin

    Open Plugins > Plugins Admin, search for Compare, tick it and install. Notepad++ restarts with a new Plugins > Compare menu.

  3. 3. Compare two files

    Open both files as tabs, select either one, and press Alt + D. Added, removed and changed lines are colour-coded in a synchronised split view.

  4. 4. Navigate the differences

    Use the navigation bar on the right for an overview of the whole file, and F7 or Ctrl + Page Down to jump between change blocks instead of scrolling.

  5. 5. Set the right language and encoding

    Pick the syntax under Language, and check Encoding. A file opened as ANSI instead of UTF-8 shows garbled accented characters and misleading diffs.

  6. 6. Clean up with Find and Replace

    Ctrl + H with Regular expression enabled handles bulk edits. Use Edit > Blank Operations > Trim Trailing Space to remove whitespace-only differences before comparing.

  7. 7. Work on very large files

    Notepad++ opens multi-hundred-megabyte logs that Notepad refuses. Disable word wrap and turn off syntax highlighting for the tab if scrolling becomes sluggish.

Alternative methods

  1. 1. Use Visual Studio Code

    Select two files in the Explorer, right-click and choose Compare Selected. Useful when the files are already inside a project you have open.

  2. 2. Compare from the command line

    With Git installed, git diff --no-index file1 file2 prints a unified diff you can paste into a ticket or review comment.

Troubleshooting

Plugins Admin is missing or empty

Portable copies extracted into a protected folder cannot write their plugin list. Run Notepad++ from a writable folder, or use the standard installer.

The whole file shows as different

Line endings differ. Use Edit > EOL Conversion to set both files to the same convention, then compare again.

Compare is greyed out

The plugin needs exactly two open documents in the same view. Close extra tabs or move one file back from a second view.

Frequently asked questions

Is Notepad++ free for commercial use?

Yes. Notepad++ is released under the GPL and can be used at work at no cost.

Can Notepad++ compare folders?

No, the Compare plugin works on open files. For directory-level comparison use a dedicated diff tool or Git.

Does Notepad++ run on macOS?

No. It is a Windows application; Mac users generally choose Sublime Text, VS Code or a native editor instead.

How do I recover an unsaved tab?

Notepad++ keeps a backup session, so unsaved tabs usually reopen after a crash. Confirm Settings > Preferences > Backup is set to remember unsaved files.

Reviewed by SoftNexi Editorial Team

Last verified: September 8, 2026