Notepad++ Plugins Admin: Compare Files and Tame Messy JSON

Two free plugins turn Notepad++ into a diff tool and a JSON fixer, installed in a minute through Plugins Admin.

FREE$34.95UpdateStar PremiumShare a link to claimTwo config files, both called settings.ini, one from yesterday's backup and one from today. Somewhere between them sits the line that broke your setup. Scrolling through both side by side and squinting is one way to find it. The other way takes two minutes to install and then shows every changed character in color.

Notepad++ ships lean on purpose, and most of its extra powers come as plugins. This guide shows how to install them safely with the built-in Plugins Admin, then puts two of the most useful ones to work: ComparePlus for diffs and JSON Viewer for turning a single-line JSON blob into something a human can read. The current Notepad++ release is 8.9.8.

Step 1: Open Plugins Admin and install ComparePlus

Plugins Admin is the official plugin store inside Notepad++. It pulls from a curated plugin list, so you don't have to hunt for DLL files on random download sites.

  1. Open Plugins > Plugins Admin....
  2. Stay on the Available tab and type ComparePlus into the Search box.
  3. Tick the checkbox in front of ComparePlus. Clicking just the name only shows the description, the tick is what counts.
  4. Click Install at the top right.
  5. Confirm the prompt. Notepad++ closes, installs the plugin and restarts.

Notepad++ Plugins Admin window with the Search box and the Install button Plugins Admin: search on the Available tab, tick the plugin, then press Install.

You'll notice an older plugin called Compare in the same list. ComparePlus is its successor from the same developer, and the old one no longer gets support. Pick ComparePlus.

If the install fails: Notepad++ needs write access to its program folder. On a normal installation under Program Files, Windows may block that. Close Notepad++, right-click its shortcut, choose Run as administrator and try Plugins Admin again. Afterwards you can go back to starting it normally.

The other tabs are worth knowing too. Updates lists newer versions of plugins you already have. Installed gives you Remove and Deactivate buttons, handy when a plugin starts crashing after an update and you want it gone without uninstalling Notepad++.

Step 2: Compare two files side by side

  1. Open both files in Notepad++ as tabs.
  2. Click the tab of the older version and choose Plugins > ComparePlus > Set as First to Compare (Ctrl+Alt+1).
  3. Switch to the newer file's tab and choose Plugins > ComparePlus > Compare (Ctrl+Alt+C).

Notepad++ splits the window in two and lines both files up. Added lines show in green, removed lines in red, changed lines get a yellow tint with the exact changed characters highlighted, and moved blocks get their own color. On the right, the navigation bar gives you a map of the whole file, so you can see at a glance where the differences cluster. The status bar sums it up with counts for added, removed, moved and changed lines.

ComparePlus in Notepad++ showing two files side by side with colored differences, the navigation bar and the summary in the status bar ComparePlus: colored diff blocks, the navigation bar on the right and the summary in the status bar.

Jump between differences with Alt+Page Down (Next Diff Block) and Alt+Page Up (Previous Diff Block). Done? Plugins > ComparePlus > Clear Active Compare (Ctrl+Alt+X) closes the comparison and gives you your normal layout back.

Step 3: Use the compare tricks you didn't know you needed

ComparePlus does a lot more than file A versus file B. These menu entries save real time:

  • Diff since last Save (Ctrl+Alt+D): shows what you changed in the current file since you last saved. Perfect before you overwrite something important.
  • Compare file/selection to Clipboard (Ctrl+Alt+M): copy text from an email, a website or a chat, then check it against your open file without creating a temporary document.
  • Compare Selections (Ctrl+Alt+N): select a block in each file and compare just those parts.
  • Git Diff (Ctrl+Alt+G): if the file lives in a Git repository, compares it against the committed version.
  • Compare Options (ignore, etc.)...: tells the plugin to ignore spaces, empty lines or upper and lower case. Great for code that someone reformatted.

Step 4: Install JSON Viewer for readable JSON

APIs, browser exports and app settings love to spit out JSON as one endless line. JSON Viewer formats it and shows it as a tree.

  1. Open Plugins > Plugins Admin... again.
  2. Search for JSON Viewer, tick it and click Install. Notepad++ restarts.
  3. Open or paste your JSON.
  4. Choose Plugins > JSON Viewer > Format JSON (Ctrl+Alt+Shift+M). The text gets clean line breaks and indentation.
  5. For the tree view, choose Plugins > JSON Viewer > Show JSON Viewer (Ctrl+Alt+Shift+J). Click a node in the tree and the cursor jumps to that spot in the file.

The same submenu has Compress JSON to squeeze it back into one line before you paste it into a config field, and Sort by key (ascending) to put keys in alphabetical order. Sorting both files first, then running ComparePlus, is a neat way to diff two JSON exports whose keys arrive in random order.

If the JSON is broken, JSON Viewer reports a parsing error and points to the spot where it gives up. That's often a missing comma or a stray quote right before the marked position.

Prefer a different tool? The Plugins Admin list also offers JSTool and JSON Tools, which cover formatting as well. Install just one JSON plugin to start with, so their menus and shortcuts don't get in each other's way.

Watch out for shortcut clashes

Plugins register their own keyboard shortcuts, and they don't always coordinate. With ComparePlus and JSON Viewer installed together, both claim Ctrl+Alt+Shift+C: ComparePlus for Find Unique Lines and JSON Viewer for Compress JSON. If a shortcut does the wrong thing, open Settings > Shortcut Mapper, go to the Plugin commands tab and give one of them a new combination.

Our verdict

Anyone who edits config files, scripts or exported data on Windows gets a lot out of these two plugins, from admins to hobby coders to people tweaking game settings. Install ComparePlus today through Plugins > Plugins Admin... and try Diff since last Save on the next file you edit. Once you've seen your own changes in green and red, you won't want to save blind again.

Related on UpdateStar

about author