How to reformat JSON in Notepad++? How to reformat JSON in Notepad++? json json

How to reformat JSON in Notepad++?


Update:

As of Notepad++ v7.6, use Plugin Admin to install JSTool per this answer

INSTALL

Download it from http://sourceforge.net/projects/jsminnpp/ and copy JSMinNpp.dll to plugin directory of Notepad++. Or you can just install "JSTool" from Plugin Manager in Notepad++.

New Notepad++ install and where did PluginManager go? See How to view Plugin Manager in Notepad++

{  "menu" : {    "id" : "file",    "value" : "File",    "popup" : {      "menuitem" : [{      "value" : "New",          "onclick" : "CreateNewDoc()"        }, {          "value" : "Open",          "onclick" : "OpenDoc()"        }, {          "value" : "Close",          "onclick" : "CloseDoc()"        }      ]    }  }}

enter image description hereTip: Select the code you want to reformat, then Plugins | JSTool | JSFormat.


For Notepad++ v.7.6 and above Plugins Admin... is available.

  1. Open Menu Plugins > Plugins Admin...

  2. Search JSON Viewer

  3. Check JSON Viewer in List

  4. Click on Install Button

  5. Restart Notepad++

  6. Select JSON text

  7. Go to Plugins > JSON Viewer > Format JSON ( Ctrl + Alt + Shift + M )

We can install any Notepad++ supported plugins using Plugins Admin...


You require a plugin to format JSON. To install the plugin do the following steps:

  1. Open notepad++ -> ALT+P -> Plugin Manager -> Selcet JSON Viewer -> ClickInstall
  2. Restart notepad++
  3. Now you can use shortcut to format json as CTRL + ALT +SHIFT + Mor ALT+P -> Plugin Manager -> JSON Viewer -> Format JSON

enter image description here