Indent XML Formatting In Notepad++


XML files are really hard to read if not in proper indentations. An easy way to do so is by using text editors like sublime and notepad++.

If you have an XML file with data unformatted, notepad++ is a great tool to format (indent or prettify) your XML file contents.

But the XML formatting plugin is not added to notepad++ by default. So you need to download libXML2-based plugin called XML tools

Downloading XML tools plugin:

  1. Go to notepad++ menu, under Plugins -> Plugin Manager -> Show plugin Manager.
  2. Now look for XML tools and tick the respective check-box, and Download the plugin.
  3. You will be asked to restart notepad++ after the plugin is installed to take effect.

Lets test the xml plugin:

Open your XML file that needs to be formatted.

Now go to Plugins -> Plugin Manager -> XML Tools -> Pretty Print (XML Only), you will see that the data of the xml file is now well formatted.

Pretty print XML in Notepad++ using XML tools.png
Pretty print XML in Notepad++ using XML tools.png
Result - XML file Prettified using Notepad++.png
Result - XML file Prettified using Notepad++.png





Recent Posts:
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.