Code Robo
Formatter
Comparator
Tester
Converter
Utility
Java Code Complience
Validator
EncoderDecoder
Virtual Service
XML Formatter With Sorting
       Talk to EasyAssistant

XMl is heaviliy used almost in all applications. Very frequently to debug an issue we take XML from log which is unformatted. Formatter is required to format the XML captured from log. Along with formatting, sometimes we need to sort the xml also alphabetically.

This Easycodeforall online XML formater tool has the capbility of formating an XML and sorting it alphabetically after formatting. Its free and available online! It can sort both elements and attributes in the XML document. Sorting is optional and its done based on user input selection. This Xml formater format XML string with 4 space indentation by default. But you can choose different indentation. It does beautify and show the formatted XML with color which is easily readable. Elements are shown in Orange color and attributes are shown in blue color. Just need to provide the XML string content as input. No need to download the tool. It supports very bix XML upto 10 MB

It has following features:

  • Provides option to remove comments while formattiong
  • Supports multiple indentation (2 space, 3 space, 4 sapce and tab)
  • Provides option to remove comments while formattiong
  • Sor the XML after formatting
  • Provides option for multiple line length / width
  • Display formatted XML highlighting the xml syntax
  • User can copy the formatted XML and/or download it by just a button click

Click Here To Watch A Demo On It(https://youtu.be/gjscMFjxNSw).

XML:(* Required): It is required.
 
Indentation : Mode : Sort the output after formatting in alphabetical order.
Remove Comments. Remove XML Decleration Line Width :
XML Examples:

All of the examples use the following sample XML code.
XML 1:


How It Works:
First it check its welformedness of the input XML document. If its a wellformed XML, it converts it into Java String. Then recreate the XML document from Java String with indentation. It does just formatting, does not re-position any element or attributes. If XML us not wedllformed it thorws exception.
Pre Conditions:
  1. XML needs to be well formed
Steps To Execute:
  1. Add XML content in the text area.
  2. Select Sort Output check box if you want sort the output alphabetically .
  3. Select text mode. Default text mode is Normalization .
  4. Select indentation level. Default indentation level is 2 space .
  5. Click on the Format XML button
Output: Output is the formatted xml content and it provide an optiom to view the xml to view the xml the browser User Comments:
ck (2022-04-10) :
I put in a big xml file (50 mb) and it doesn't work. The site keeps timing out when I try
    Reply;
easycodeforall: (2022-04-12)
Thanks CK for reporting the issue. We will chek it. Apperent this issue is because of the size of the file.
    Reply

annonymous (2022-04-15) :
Doesn't work with special characters, should add an option for charsets
    Reply;
anonymous: (2022-04-21)
Thanks for using easycodeforall! We will try to add character set option in the UI.
    Reply

Sunanda Roy (2022-06-22) :
XML Sorting is very useful!
    Reply;
easycodeforall: (2022-04-21)
Thank you so much!
    Reply

anonymous (2022-08-16) :
Do you have an api for formatting and sorting xml for java or nodejs
    Reply;
easycodeforall: (2022-04-21)
Thanks for using easycode xml formatter. We do not have any public API. But if you email (easycodeforall@gmail.com )us your exact requirement, we may be able to help you.
    Reply

anonymous (2022-08-17) :
Hi, Do you have api for java?
    Reply;

abcd@gmail.com (2023-08-17) :
Hello, I really appreciate the tool that you guys have provided. I'm using it regularly. Today i have encountered an issue: i was trying to format a large document (1 531 054 characters - minified version). The result tab is blank. I think it is related to the size of the doc. Can you lplease ook on to that or specify the max size that we can format? Thanks for the great work you are doing,
    Reply;

abcd@gmail.com (2023-08-17) :
Hello,
I really appreciate the tool that you guys have provided. I'm using it regularly. Today i have encountered an issue: i was trying to format a large document (1 531 054 characters - minified version about 1.5MB). The result tab is blank.
The option i select was :
indentation: 2 spaces
mode: normalize
sort ,,,: checked
remove content: checked
remove xml : checked
line width: 120
Can you please look on to that ?
Thanks for the great work you are doing,
    Reply;

Dale (2024-04-04) :
I tried the xml format with sort, and I wonder if you might consider extra options. i.e. I want to sort elements by their attributes but I would prefer to have control over whether the attributes themselves are sorted horizontally in the output. So if the first attribute is "name" and that is most important to me, then I don't want it thrown to the end of the node def by attrib sorting. And if the nodes have alphabetically preceding attributes that have varying values I don't want to sort nodes by the sorted attributes list, but by specific nominated attributes (so if I prefer to sort "item" nodes by attribute "name" then "date" perhaps they can be brought to the front of the sorted attributes and sorting of nodes will naturally be correct.
Anyway thanks for reading this far :-)
Dale
    Reply;
easycodeforall: (2024-04-27)
Thanks you so much for your feedback! We will provide soon sorting option by Element or Attribute or both!
    Reply


Post Your Comment:
Name :
Email ( Optional) :
Comments / Suggestion (* Required) It is required: :
: