Here are 8 free online XML formatter websites. These websites help you add input XML file directly or paste XML code manually. After that, based on the options provided by the website, you can set the indent level as tab or character, start and end lines for braces, remove unwanted lines, etc. This way you are able to format XML file and get the output. Finally, you can copy the well-formatted XML output to clipboard and save it anywhere.
You can also use other interesting features provided by these websites. For example, you can preview input and output XML data within the same page, download output XML as JSON file, minify XML, and more.
Let’s check these online XML formatters one by one.
Online XML Beautifier & Formatter
Online XML Beautifier & Formatter (Homepage) is one of the best websites here. The major advantage of this XML formatter over other sites is the number of options. There are many useful options present to format XML file. You can set indent level with a tab, indent with 2, 3, 4, or 8 characters, remove extra new lines to beautify XML, wrap lines near 40, 70, 80, 110, 120, or 160 characters or disable line wrap, start and end braces on same lines, end XML script with newline, add space before conditions, etc.
While other sites mainly help to set indent level, wrap lines, and set start and end braces on same or new lines only, this website gives a lot of other options as mentioned above. Add input XML data, set options, and use Format code button. It will immediately format the input code and you can view it and copy it. The feature to preview input and output code for changes is not present, still the website is great because of the features provided by it.
Free Online XML Formatter
Free Online XML Formatter website (Homepage) is very simple but brings some useful options. For XML formatting, it lets you enable indent attributes and set indent character. The indent character can either be tab or space. If you have set indent character as ‘space’, then it also lets you add the total number of depth (or characters) for this option and each line of XML data will have that number of indent characters before XML data.
You can also preview input and output XML data to see the differences. One more feature that I like is it first checks if your XML data is valid and then only generates output based on the options set by you. So, you can also use it as XML validator. This online XML formatter doesn’t upload an XML file directly. You need to copy and paste the XML data, set options, and then copy output XML content to clipboard.
FreeFormatter.com is another handy XML formatter website. This website supports both, single XML file format feature and format multiple XML files at once. For both the features, it provides different pages and options. In single XML formatter feature, it lets you upload maximum 2 MB XML file from PC or paste the code of XML file in the given box. After that, you can use text mode and indentation level options. In text mode option, you can select option to trim whitespaces in XML data, trim and normalize spaces to a single space, or use left and right trimming. For indentation level option, you can select 3 spaces per indent level, 2 or 4 spaces per indent level, or set tab delimited indent level. The option to set encoding (UTF-16, UTF-8, etc.) of input XML file is also available. The output can be viewed within the same page or in a new window.
If you want to format multiple XML files together and need more file size limit, then you need to use its batch formatter feature. In this mode, you can add 10 XML files from PC, up to 100 MB, and then use the formatting options. Available formatting options are: set indentation level (same as available in single XML file formatter mode), encoding mode of input files, and brace style (collapse braces on same line, expand braces on different lines, or open braces on the same line and end braces on different line).
Both the features, single formatter and batch formatter, are pretty useful. So, you can use any feature as per your requirements.
Online XML Formatter and Minifier
If you are looking for a website that can format XML data as well as minify it, then this Online XML Formatter and Minifier is quite helpful. Here is its homepage. Just three steps are needed to follow. Copy and paste XML file data on website box, press Format XML and/or Minify XML button to generate output, and use Copy to Clipboard button to paste the output data. You can also save the output as JSON file.
Here, the best part is the website automatically processes input code to format and minify XML. But, you might not like that it doesn’t give you options to format XML data as per your needs. If the features of this website are satisfactory, then the website is a good option to try. Otherwise, you may check other sites covered on this list.
XML Formatter & Beautifier
XML Formatter & Beautifier (Homepage), as its name indicates, serves two different purposes. Apart from making XML data structure properly formatted, it also beautifies the data. You don’t have to adjust options on your end. It automatically sets indent level, adds end brace to separate line, and do other adjustments for XML formatting, removes white spaces to beautify XML data, etc.
Another good feature of this website is there are three ways to add input XML file. You can upload XML file stored on PC, copy and paste XML data to available box, or load an online XML file URL. After that, press XML Formatter & Beautifier button and it will present the output XML data. Copy the output and save it.
Online Toolz XML Formatter
Online Toolz website brings a very simple XML formatter feature which works similar to XML Formatter & Beautifier website (mentioned above). It comes with a basic interface where you will find two boxes. One box helps to enter XML data, which is input, and other data shows the formatted XML (the output).
There are no options, except a Format button, which helps to format XML. Just press that button and this website will process input data. It will set indent level, adjust braces to make data look good, and other changes to format XML file. When the formatted XML looks good, copy it to use.
XML Formatter Online
XML Formatter Online (homepage) is a simpler website. It comes with only one option to format XML data, which is to set indent level as characters. You enter the XML data, add value as number of characters for Indent Level, and press Format XML button. When the output is generated, it is visible on the bottom part of its interface. The good thing is you can preview input and output data and see if the output is good.
This website automatically copies output data to clipboard, which is a nice feature. If your need is to format XML code based on indent level only, then this online XML formatter deserves a try.
KW Online XML Formatter
KW Online XML Formatter (Homepage) is a very basic website which can help you format XML data in just a single click. There are no options and description. Only a box where you can enter XML data and use Format XML button to get the output.
It doesn’t mention how it formats XML data but I guess this website, like many other online XML formatters, also adjusts indent level to format XML data. Other than that, you won’t find any other feature. So, if this is OK for you, then this online XML formatter can be useful.
These are some really helpful online XML formatter website you can try. Every XML formatter website is good here but some are better than others. The one that I find most useful is “Online XML Beautifier & Formatter” (the first website). The options provided by this website are just awesome and no other online XML formatter covered here come with such options.