XML formatter Notepad++ XML plugin indent html

Quick links

It is possible, and even very easy, using Notepad++ software as an XML editor, to indent an HTML file, using the Notepad++ XML plugin called XML Tools, directly available in the Plugin Manager, which is built in Notepad++ - a great XML viewer by the way.

How to get beautiful XML

If you haven't done it yet, start to install Notepad++ before proceeding.

Download Notepad++ 64 bit, an open source and free notepad, great XML file viewer

Starting with some raw HTML, XHTML, or any open XML file, without any indentation - meaning the HTML tags are not visually separated from each other.

XML formatter Notepad++ XML plugin indent html : Unformatted XML file
Unformatted XML file

Open the Plugin Manager from Plugins menu.

XML formatter Notepad++ XML plugin indent html : Show plugin manager in Notepad++ plugins option menu
Show plugin manager in Notepad++ plugins option menu

There, scroll down to find the XML Tools, which should be available there by default. If it is not, you can always download Notepad plus plus from below repository, and see our other article to install plugin.

Notepad++ XML plugin XML Tools repository on SourceForge
XML formatter Notepad++ XML plugin indent html : XML Tools plugin for Notepad plus plus in plugin manager
XML Tools plugin for Notepad plus plus in plugin manager

Then, simply click install from the Plugin Manager, the rest should be automatic.

XML formatter Notepad++ XML plugin indent html : Starting the XML Tools plugin installation
Starting the XML Tools plugin installation
Notepad++ cannot load 32 bit plugin on Windows

In case you have not updated your Plugin Manager for a while, you might get a message telling you to update it before installing any new plugin, which is strongly advised.

An update is available to plugin manager. It is strongly advised that the plugin manager is updated before any other plugin is installed or updated. Would you like to update the plugin manager now ?

XML formatter Notepad++ XML plugin indent html : Plugin manager update message in notepad plus plus
Plugin manager update message in notepad plus plus

How to format XML file in Notepad++

Then, the installation will happen automatically, simply relax while it is progressing. Not counting the download time, it should take no more than 5 minutes to complete.

XML formatter Notepad++ XML plugin indent html : Notepad++ plugin installation in progress for XML beautifier
Notepad++ plugin installation in progress for XML beautifier

Before the end of the installation, Notepad plus plus will ask to restart alone. No worries, just like any update in Notepad++, no work will be lost, even if not saved. However, it is of course safer to save all open work before doing this operation :

Some installation steps still need to be completed. Notepad++ needs to be restarted in order to complete these steps. If you restart later, you will be prompted again. Would you like to restart now ?

XML formatter Notepad++ XML plugin indent html : Restart message in plugin manager
Restart message in plugin manager

Once Notepad++ has restarted, the XML Tools plugin is available in the Plugins menu, with all its useful options for XML notepad.

XML formatter Notepad++ XML plugin indent html : XML tools available in plugin menu
XML tools available in plugin menu

What is the difference between HTML and XML

The data indent with the XML parser - or HTML data indent, as HTML is a specific XML doctype among others, using a specific XML schema - select the Pretty print (XML only - with line breaks) in the XML Tools plugin, this will indent the whole data.

XML formatter Notepad++ XML plugin indent html : Pretty print (XML only - with line breaks) option in plugin manager
Pretty print (XML only - with line breaks) option in plugin manager

HTML to XML basically doesn't mean anything, as HTML is already written in XML language. XML and HTML are basically similar.

Compare two text files with Notepad++

XML prettifier

And that's it, the HTML data should now appear properly indented, with visually easy to see separation between the different elements, would it be XML or HTML. It is particularly good to debug HTML, when errors like missing end of tags are reported by checks like the W3C validator, which can be used as an XML validator for HTML.

XML formatter Notepad++ XML plugin indent html : XML pretty print result in Notepad++
XML pretty print result in Notepad++

Notepad++ works that way as a very efficient XML beautifier, making code easy to read, troubleshot and share, probably the best notepad for HTML.

Good luck building your XML document and making great XML code, it should now be much easier with this XML reader ! Also works great for XML pretty print, get an XML file example and see for yourself how to XML structure is properly displayed. XML document structure is very important to respect the XML standard, and benefit from all features of XML.

Notepad++ portable is also a great way how to open XML, and works as well for XML indent
Notepad++ open file in a new window

Similar articles

Comments (0)

Leave a comment