Notepad++ JSON formatter Plugin (JSONViewer) – (How) Download, Install and Use

JSON stands for JavaScript Object Notation is a lightweight data-interchange format. Mostly you would have used it in web service to send and receive payloads. JSON is based on the collection of name/value pairs and an ordered list of values.

You can use any text editor even Notepad to create and modify JSON. Smaller files are easy to read and understand. You need a tool for the large and complex one to quickly format and compress JSON.

In this article, I am going to cover JSON Plugin for Notepad++ which you can use to view, format, and compress JSON.

Notepad++ JSONViewer Plugin

JSONViewer is a JSON formatter plugin for your favorite text editor Notepad++  which helps you to view JSON in Tree view Format. You can quickly format and even compress JSON using this plugin. It also highlights parsing errors as well.

Developer – Kapil Ratnani

Github Repository – JSON-Viewer

This is the way you can install JSON Viewer Plugin in Notepad++,

Open Notepad++ and Go to Plugins -> Plugin Admin… and Search for JSON Viewer plugin and click Install button to install JSON Viewer plugin in Notepad++ using Plugin Admin or Plugin Manager.

Search and Install JSON Viewer Plugin in Notepad++
Search and Install JSON Viewer Plugin in Notepad++

Sometimes this may not give you the latest plugin version. In that case, install the plugin manually using the steps given below.

Manual Installation Steps,

  1. Close Notepad++
  2. Download the latest version JSONViewer plugin and extract the NPPJSONViewer.dll file.
  3. Create NPPJSONViewer subfolder in NPP plugins folder.
  4. Copy NPPJSONViewer.dll to the above folder.
  5. Restart Notepad++

That’s it. You have successfully installed the plugin.

The plugin should be available under plugin Menu in the toolbar as shown in the below image.

How to View, Format, and Compress JSON in Notepad++

Now let’s see how to use the JSON viewer plugin. We are going to take a sample JSON and show you how it works. You can download the sample JSON from this link.

1. Show JSON Viewer

Go to Plugins -> JSON Viewer -> Show JSON Viewer. This opens a frame on the left-hand side which shows the TreeView of the JSON. You can select individual nodes to navigate to the child node.

TreeView of the JSON in Notepad++
View JSON in Notepad++

One thing I observed is that when we select any node it does not highlight the same in the Notepad++ document.

2. Format JSON

Formatting JSON in Notepad++ is also very easy using this plugin. Just select Format JSON options and the plugin format it for you. If there are any parsing errors, it will give you an error message saying parsing error.

formatted JSON in Notepad++
Format JSON in Notepad++

3. Compress JSON

The compress JSON option is useful when you want to use JSON as the Web Service Payload and want to reduce the size. Just click that option and your JSON will be compressed by removing spaces.

compressed JSON in Notepad++
Compress JSON in Notepad++

Summary

JSON Viewer Plugin is a helpful plugin that displays, compresses, and formats JSON. This plugin can be very useful if you want to quickly view or edit your JSON document in Notepad++without the need for any other software.

We hope this blog post has given you some insight into how it works and what benefits it may bring to your projects!