How to Compare Two Files With Notepad (2024)

Whether you’re a computer programmer or an average computer user, you’ve probably needed to compare two files at some point. The best course of action is not to manually skim through the files to identify the differences. Doing so will only waste time that could be better spent elsewhere. Or even worse, you could run the risk of missing out on any significant differences that might occur between the two files.

How to Compare Two Files With Notepad (1)

But worry not. This article delves into the specifics of comparing two files using your preferred text editor, Notepad++. We will show how you can compare two files with and without a plugin, as well as how to diff two files in case you’re working with a version control system. Let’s dive right in.

How to Compare Two Files With Notepad++

There are many reasons why you would want to compare two different versions of a file. For example, if you’re copying a file from one folder to another, packet loss and data corruption might happen along the way. To ensure that your file is indeed similar to its original version, you must perform some comparison.

Notepad++ is a good tool for comparing files. Unfortunately, the functionality isn’t built into the software. For that reason, you’ll need to install the Compare plugin for the process to yield any meaningful results. As the name reads, the Compare plugin allows you to compare two files by highlighting any visual differences that occur between them. The differences are highlighted through the use of different colors and icons. For example, red means a line was omitted, green means a line was added, and orange means the line was modified.

Using the plugin, you can compare various iterations of the files stored on your local machine. To set the bar even higher, the plugin allows you to compare files that are stored on online repositories, namely Git and SVN. Whatever your needs, the Notepad++ Compare plugin has you covered.

How to Compare Two Files in Notepad++ Side by Side

To compare two files in Notepad ++ side by side, follow these steps.

  1. On your computer, open the Notepad++ app.
    How to Compare Two Files With Notepad (2)
  2. Go to “Plugins” and select “Plugins Admin.” If you miss out on the “Plugins Admin…” option, navigate to “?” then select “About Notepad++” and double-check that you’re running the current version.
    How to Compare Two Files With Notepad (3)
  3. On the “Plugins Admin” modal, search for the plugin called “Compare” and select it from the results.
    How to Compare Two Files With Notepad (4)
  4. In the top-right corner of the screen, press the “Install” button.
    How to Compare Two Files With Notepad (5)
  5. Follow the instructions given in the installation wizard to finish the plugin setup.
    How to Compare Two Files With Notepad (6)
  6. Drag and drop the two files you’d like to compare into your Notepad++ editor and ensure they lie next to each other.
    How to Compare Two Files With Notepad (7)
  7. On the top menu, navigate to “Plugins” and expand the “Compare” menu.
    How to Compare Two Files With Notepad (8)
  8. From the options, select “Compare.” Alternatively, you can press “Ctrl + Alt + C.”
    How to Compare Two Files With Notepad (9)
  9. Instead of manually scrolling through the file to identify the highlighted differences, use the “Compare Navigation” icon instead, especially for large files.
    How to Compare Two Files With Notepad (10)

If you have a penchant for personalization and like to tweak things a bit, you’re in luck. The Compare plugin allows you to adjust the settings, giving you a customized experience from the app. Here’s how to customize your Compare plugin settings.

  1. Go to “Plugins” and open the “Compare” menu.
    How to Compare Two Files With Notepad (11)
  2. From the options, select “Settings.”
    How to Compare Two Files With Notepad (12)
  3. Choose all the custom presets for your files and press the “Reset” button.
    How to Compare Two Files With Notepad (13)

Once you’re done comparing your files, go to “Compare” and select the “Clear All Compares” option. This should return your files to normal and remove all the highlights.

How To Diff Two Files With Notepad++

If you’re a developer and want to diff two files using Notepad++, you’ll need to have the Compare plugin installed. The plugin allows you to diff two files that are stored on a local repository. Currently, the Compare plugin supports only two versioning systems, Git and SVN.

Here’s how to diff Git files using Notepad ++.

  1. Launch Notepad ++.
    How to Compare Two Files With Notepad (14)
  2. Open the Git repository that holds your code.
  3. Go to “Plugins” and expand the “Compare” menu.
    How to Compare Two Files With Notepad (15)
  4. From the options, select “Git Diff.”
    How to Compare Two Files With Notepad (16)

With the Git Diff option selected, you should see the differences between the current file and the file you have stored on the Git repository.

How to diff two SVN files using Notepad ++.

  1. Open Notepad++.
    How to Compare Two Files With Notepad (17)
  2. Open the SVN repository file that you want to diff.
  3. Go to “Plugins” and expand the “Compare” menu.
    How to Compare Two Files With Notepad (18)
  4. From the options, select “SVN Diff.”
    How to Compare Two Files With Notepad (19)

How to Compare Two Files in Notepad++ Without a Plugin

Don’t want to go through the process of installing a third-party plugin? Well, here’s how to compare two files in Notepad ++ without a plugin.

  1. Open Notepad++.
    How to Compare Two Files With Notepad (20)
  2. Drag and drop the two files you would like to compare into the editor.
    How to Compare Two Files With Notepad (21)
  3. With the two files open, right-click on the file tab and select “Move to Other View.”
    How to Compare Two Files With Notepad (22)
  4. Your files should now lie next to each other, and you should be able to compare them.
    How to Compare Two Files With Notepad (23)

The downside of the above method is that it’s hard to compare two large files. If you skim the files manually, you’re bound to miss out on some critical details.

FAQ

Are Git and SVN the same thing?

Git and SVN are both version control systems, but they aren’t the same platform (think Facebook and Instagram; they are both social networks, but aren’t exactly the same platform). While Git is decentralized, SVN is pretty much a centralized versioning system.

Ditch the Old Way of Skimming Through Files

Files are an essential part of our workflows, and knowing the difference between two file versions doesn’t have to be a hassle. Notepad++ features the Compare plugin, making the process much easier. The plugin has the Git Diff and SVN Diff, which makes it a snap for programmers to diff files stored in repositories and online databases. Regardless of your needs, we hope you can now compare files through the Notepad++ text editor.

Have you tried using a command or a code script to compare two files with Notepad++? Please let us know in the comments section below.

Related Posts

How To Compare 2 Files in VS CodeHow to Merge PowerPoint Files into a Single FileHow to Batch Rename Files inHow to Add Local Files to SpotifyHow to Clear and Turn Off Recent Files inHow to View Hidden Files inHow To Move Files Faster in Windows 10How To Send Files from Mac to Windows and Vice Versa with BluetoothHow to Recover Deleted USB Files

How to Compare Two Files With Notepad (2024)

FAQs

How to compare two files in Notepad? ›

Open the two files you want to compare in Notepad++. To compare the two files, go to the Plugins menu, open Compare, and then select Compare. The Compare plugin will now put the files side by side and highlight their differences. You can set any open file as the reference with Compare > Set as First to Compare.

How to compare the contents of two text files? ›

Approach:
  1. Open the files to be compared.
  2. Loop through the files and compare each line of the two files.
  3. If lines are identical, output SAME on the output screen.
  4. Else, output the differing lines from both the files on the output screen.
Jan 7, 2023

What is the best way to compare two files? ›

File and Document Comparison Tools
  1. Kaleidoscope. Kaleidoscope lets you compare text documents (including source code) and images. ...
  2. Litera Compare. Litera Compare accurately detects changes across any two documents in seconds. ...
  3. GlobalVision. ...
  4. ExamDiff. ...
  5. Diff Doc. ...
  6. Compare Suite. ...
  7. WinMerge. ...
  8. Araxis Merge.
Apr 2, 2024

How do I show only differences in Notepad++ compare files? ›

If you only want to view the lines that are different, you can use Plugins > ComparePlus > Show Only Diffs (or the ShowOnlyDiffs button next to the “Last” button on the toolbar), but unfortunately, even if it only shows the differing lines, it will still copy all the lines (even the hidden ones) with a Ctrl+A, Ctrl+C .

How to check if two files have the same content? ›

Comparison Using cmp

GNU cmp compares two files byte by byte and prints the location of the first difference. We can pass the -s flag to find out if the files have the same content. Since the contents of file1 and file2 are different, cmp exited with status 1.

How to compare two notepad files online? ›

GoTranscript offers everyone a free tool that works beautifully. All you have to do is paste two sets of text, one on the left box and another on the right. After that, go ahead and click the Compare button. The tool will then mark the text differences and return a percentage of similarity.

How do I compare the contents of two documents? ›

Compare two versions of a document
  1. Open one of the two versions of the document that you want to compare.
  2. On the Review menu, select Compare Documents.
  3. In the Original document list, select the original document.
  4. In the Revised document list, browse to the other version of the document, and then select OK.

How to use text compare? ›

Just paste the two texts and hit the compare button. The two texts are shown side by side, with differences highlighted. It highlights not the entire line which contains a difference, but only the difference itself. For larger texts, it also has links that allow you to jump from one difference to the next.

How do I compare two large text files? ›

UltraCompare is a very robust file comparison tool which includes support for comparing large files – even multi-gigabyte files. In fact, there is no hard-coded limit on the file size that UltraCompare supports – you are only limited by your system resources (memory, virtual memory, and disk space).

What is the command to compare two files? ›

the cmp command is used to compare two files byte by byte. If a difference is found, it reports the byte and line number where the first difference is found. If no differences are found, by default, cmp returns no output. If you want, you can also make 'cmp' display the differing bytes in its output.

How do you check the difference between multiple files? ›

You can use Ctrl+click and Shift+click to select files. Run the diff operation (Diff Against Basis, for example). The diff operation is performed against the first of the files you selected. Results are shown in the Diff tab.

How do I compare two files in notepad? ›

Compare Two Files in Notepad++

Do this by choosing File > Open from the menu bar. After opening both files, from the app's menu bar, select Plugins > Compare > Compare. The Compare plugin will do its job, which is to start highlighting the differences in your files.

How do I compare two text files in beyond compare? ›

Open a window of your filesystem, rightclick, in the grey context menu, select Compare. You should see some files and folders open up: Things to notice about your two text files once they open up: pink areas have major differences, blue areas are unimportant differences, such as blanks, spaces, or capitalization.

How to compare two scripts? ›

The tool is really easy to use, simply copy your original and changed code, or text, into the relevant boxes below and then click the 'Compare' button. The differences will then be highlighted for you above, along with a note to let you know how many lines of code are different.

How do you add compare in notepad? ›

Configure the Notepad++ Compare Plugin
  • Click on the Plugins option in the top menu and select Plugins Admin from the context menu.
  • Scroll down the list of plugins, and then tick the checkbox next to Compare and click on Install. ...
  • Now, click on Yes when you are prompted to execute this action.
Jul 12, 2023

How to compare two texts? ›

You should also try to notice the opinions the writers have, and how they are similar or different. Main points, ideas and opinions are the main things which you can compare. However, you can also compare features such as the way the text is written.

How to compare two files in Wordpad? ›

To compare documents, make sure both files are open. In the “Review” tab, click the “Compare” button. A new window will open – select the original document as the first file and the revised version as the second. Double-check your selections before proceeding.

Top Articles
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated:

Views: 6584

Rating: 4.4 / 5 (75 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.