11 min read read
By Imad Uddin

How to Format JSON in Notepad++: Plugin Setup & Shortcuts (2026)

How to Format JSON in Notepad++: Plugin Setup & Shortcuts (2026)

Notepad doesn't format JSON by default. Install the JSTool plugin (takes 2 minutes) and you'll have a keyboard shortcut that formats any JSON file instantly.

Method 1: JSTool Plugin (Recommended)

  1. Open Notepad → Plugins menu → Plugins Admin
  2. Search "JSTool" → tick the checkbox → Install → restart Notepad++ when prompted
  3. Open your JSON file (or paste JSON into a new tab)
  4. Go to Plugins → JSTool → JSFormat (or press Ctrl+Alt+M)
  5. Done - your JSON is now indented and readable

The Ctrl+Alt+M shortcut may not work on all setups. If it doesn't, use the Plugins menu path instead.

Before formatting:

{"name":"Alex","age":30,"hobbies":["reading","cycling"]}

After formatting:

{
  "name": "Alex",
  "age": 30,
  "hobbies": [
    "reading",
    "cycling"
  ]
}

Method 2: JSON Viewer Plugin

  1. Open Notepad → Plugins → Plugins Admin
  2. Search "JSON Viewer" → tick the checkbox → Install → restart when prompted
  3. Open your JSON file
  4. Go to Plugins → JSON Viewer → Show JSON Viewer
  5. A tree panel opens showing your JSON structure

Difference between plugins: JSTool formats the text in place. JSON Viewer shows a tree panel alongside. Use JSTool for formatting, JSON Viewer for browsing structure.

If Formatting Isn't Working

Plugin installed but format doesn't work: Make sure the file has a .json extension or manually set language to JSON (Language menu → J → JSON).

JSON has errors and won't format: Plugin can't format invalid JSON. Paste into jsonlint.com to find the error first.

Can't find Plugins Admin: Older Notepad versions - update to 7.6+ or install plugins manually.

One-Liner Alternative

No plugin needed: python3 -m json.tool yourfile.json outputs formatted JSON to the terminal. Redirect to a file with > formatted.json.

Frequently Asked Questions

What's the keyboard shortcut to format JSON in Notepad++?

Ctrl+Alt+M after installing the JSTool plugin. This formats your JSON instantly with proper indentation. If the shortcut doesn't work, go to Plugins → JSTool → JSFormat manually. The shortcut may differ in older Notepad versions or conflict with other plugins.

Why won't my JSON format in Notepad?

Your JSON has syntax errors. JSTool only formats valid JSON. Common errors: missing commas, extra trailing commas, single quotes instead of double quotes, unmatched brackets. Paste your JSON into jsonlint.com to find the exact error location and line number, then fix it.

How do I install the JSON plugin in Notepad?

Open Notepad, click Plugins in the top menu, then Plugins Admin. Search for "JSTool", check the box next to it, click Install, and restart when prompted. After restart, format JSON with Ctrl+Alt+M or Plugins → JSTool → JSFormat.

Can Notepad validate JSON errors as well as format?

JSTool validates JSON during formatting. If your JSON has errors, formatting fails silently. For detailed validation with error messages, use the JSON Viewer plugin or paste into jsonlint.com. JSONLint shows the exact line and character where errors occur.

Is there a way to format JSON in Notepad without any plugins?

No built-in way. Notepad++ requires a plugin for JSON formatting. Fastest option without a plugin: paste your JSON into an online formatter like jsonformatter.org, copy the formatted output, paste back. Or use Python: python3 -m json.tool input.json > output.json.

Read More

All Articles