How to compare two text and HTML files to find the differences

I often have to compare two texts, whether it’s two HTML pages, PHP or plain text written in Word or PDF files (remember when Google’s new guidelines for quality raters came out?). Sometimes I don’t remember what changes between one version of a script and the previous one and I find a method to compare two strings of text to find the differences.

For this function, as useful as it is simple, I use Notepad ++ , a simple free text editor that automatically shows the differences between two similar texts. Notepad ++ is one of the most versatile text editors and has the great advantage of being open source and therefore free. This I am describing is not the only method, at the bottom of the article you will find both software and online alternatives .

First you need to download the Notepad ++ software, then start it, it takes 30 seconds to do everything. Once you have launched the text editor, you can open two new blank pages and insert the original text in the first and the modified text in the second.

Open two tabs

At this point we need a small additional plugin that we download directly with the integrated function in Notepad ++: navigate to Plugins> Plugin Manager> Show Plugin Manager .

Open the plugin manager in Notepad ++

The repository is full of useful and free plugins . Look for the plugin called “Compare” and install it.

Install the Compare plugin

Now you need to run the plugin to do the comparison: navigate to Plugin> Compare> Compare .

Launch the plugin to compare the text

The software places side by side the two tabs that contain the texts to be compared, and performs a check highlighting the differences.

The software highlights the differences

Finding the differences is now a beginner’s game. Convenient isn’t it?

Alternatives?

WinDiff is a free tool from Microsoft for Windows that allows the comparison of two files to identify the differences. Since 1992 it has been distributed within the Windows 2003 support tools . To avoid having to download the whole archive I thought of inserting it as a single file that you find here: WinDiff File Comparison Utility .

You don’t like Notepadd ++ and neither does WinDiff? How difficult are you… Then try PSPad , yet another text editor with the function of comparing two files.

Online tools?

Don’t want (or can’t) install software on your machine? No problem. Online there are so many alternatives to compare two files, try going to Google and search for ” file comparison ” or ” diff “. The first result is Diffchecker , a web application for comparing text files without having to install anything on your PC

Related posts