Can Notepad++ Format JSON?
Updated

Notepad++ is a popular free text editor used by developers and writers alike, and yes, it can format JSON. JSON, or JavaScript Object Notation, is a lightweight data-interchange format widely used for exchanging data between a client and a server. In this article, we will show you how to use Notepad++ to format JSON data.
Notepad++ JSON Formatter
Formatting JSON by hand can be tedious, especially with large or complex data. Notepad++ offers a simple and efficient way to format JSON so it's easier to read and understand. Notepad++ does not include a JSON formatter out of the box, so you'll use a free plugin called JSON Viewer.
Step 1: Install the JSON Viewer Plugin
Select "Plugins" from the menu bar and choose "Plugins Admin…". In the "Available" tab, search for "JSON Viewer", check the box next to it, and click "Install". Notepad++ will restart to finish the installation.
Step 2: Open the JSON File
Open the JSON file you want to format, or paste your JSON into a new tab.
Step 3: Format the JSON Data
Select "Plugins" > "JSON Viewer" > "Format JSON", or press Ctrl + Alt + Shift + M. Your JSON is instantly reformatted with proper indentation and line breaks. To select only part of a document, highlight it first and the formatter will apply to the selection.
Step 4: Explore the Tree View (Optional)
Select "Plugins" > "JSON Viewer" > "Show JSON Viewer" (Ctrl + Alt + Shift + J) to open a collapsible tree panel that makes it easy to browse nested objects and arrays.
Step 5: Save the Formatted JSON
Save the file with Ctrl + S, or select "File" > "Save As" to save a copy with a new name. Make sure the file keeps the .json extension.
Notepad++ JSON Formatter Options
Depending on your version, the JSON Viewer menu also includes options such as:
- Compress JSON: removes all whitespace to make the JSON as compact as possible (minify).
- Settings: lets you choose indentation (spaces or tabs and how many) and other formatting preferences.
Conclusion
Notepad++ is a versatile text editor that makes formatting JSON simple. With the JSON Viewer plugin, you can turn messy JSON into clean, readable data with a single shortcut. Before installing any plugin, it's worth reading our guide on whether Notepad++ plugins are safe.
