How To Auto-Format / Indent XML/HTML in Notepad++ How To Auto-Format / Indent XML/HTML in Notepad++ xml xml

How To Auto-Format / Indent XML/HTML in Notepad++


Since I upgraded to 6.3.2, I use XML Tools.

  • install XML Tools via the Plugin Admin (Plugins → Plugins Admin... Then search for "XML Tools", check its box and click the "Install" button).
  • use the shortcut Ctrl+Alt+Shift+B (ormenu → Plugins → XML Tools → Pretty Print)

enter image description here

enter image description here

In older versions:menu → TextFX → HTML Tidy → Tidy: Reindent XML.


Install Tidy2 plugin. I have Notepad++ v6.2.2, and Tidy2 works fine so far.


For those who don't know, npp has a lot of support from plugins and other projects. You can download those plugins from SourceForge.

enter image description here

You need XML Tools to format your text in n++

After you have downloaded XML Tools ..

Exit Notepad++

Go To C:\Program File\Notepad++ .... Your N++ installed folder.

  1. Place below files from xml tools which you downloaded in the npp root folder by copy replace

enter image description here

  1. Go To ..\Plugins subfolder and place below downloaded file

enter image description here

Restart and enjoy!!!

Ctrl + Alt + Shft + B to format.