At some point you need to compare the contents of two files in Notepad++, but rather than switching tabs repeatedly to do the comparison, is there a better way to do this? compare two files in Notepad++? Yes there is.
Notepad++ makes it easy to spot differences between files with handy comparison capabilities built right into the editor and if you want to go a little further, there is a comparison plugin in Notepad++ that provides highlighting capabilities to purposes of comparison. In this guide, we will describe the process of How to compare two files in Notepad++ side by side and understand the difference in highlighting.
Notepad++ is a free and open source text editor and code editor for Windows. It is designed specifically for programmers and supports a wide range of programming languages and markup languages.
How to compare two files in Notepad++?
Follow these simple steps to compare two files in Notepad++:
Step 1: In your Notepad++ appclick on the ‘Plugins‘ in the menu bar, then select the option ‘Plugins Administrator’ option.
2nd step: Now in the plugins admin search ‘Compare’.
Step 3: Select the ‘Compare’ plugin and click the install button in the upper right corner.
Step 4: Click on Yes and Notepad++ will restart with the Compare plugin installed.
Step 5: Now open two files you want to compare, click Plugins in the menu bar, select Compare in the list, then click again Compare of the sublist.
This is how you can compare two files in Notepad++. This was a simple 5 step process, which requires a Compare plugin installed to compare files.
Here’s a video tutorial on YouTube, in case you need additional visual aid:
When using the Compare plugin to compare two files in Notepad++, a few main symbols may appear to highlight the differences. Let me break them down so you can understand better:
- Text highlighted in green – Indicates text that exists in the file on the right side but not on the left side. So green highlights show newly added or edited text.
- Text highlighted in red – Indicates text that exists in the file on the left side but has been deleted or modified in the file on the right side. The red highlights therefore show the deleted text.
- Text highlighted in blue – Indicates a change in word case between the two files. For example, a word being capitalized on one side but not the other. Lowercase or UPPERCASE.
- White space highlighted in pink – Indicates a difference in space between files, such as changes in spacing or line breaks.
Additionally, some other symbols include:
- ↕ Symbol – Shows blocks of text that have been moved up or down relative to their position in the other file.
- ≈ Symbol – Appears on unchanged lines to help orient identical content between files.
Compare two files in Notepad++ without plugin
If you don’t want to compare two files in Notepad++ without a plugin, there is a way to open the files side by side to see the changes. But it will not have features like syntax highlighting etc. which were available in the Compare connect.
Step 1: Open two files on your Notepad++ that you want to compare.
2nd step: Now, right-click on the tab of the file you want to move to the side. Click on ‘Move the document‘ then select the “Switch to another view” option.