🚀 Visit and see how our service has changed over the past week →

XML to YAML Converter Online

Transform XML into YAML format, with validation, the output beautify.

How to use the XML/YAML converter?

Declarations will be converted, but comments will not. Tag attributes will be shown inside the converted element. If there was more than one attribute, they will be the value of the ’_attributes’ key. If there was only content inside, it will be converted to a key-value pair. Identical tags will be converted into an array under the same key. If there was both content and another tag inside a parent tag, after conversion, the content will be the value of the ’_text’ key. The converted YAML will automatically be formatted with the indentation specified in the settings and displayed in a read-only field.

Input:


<?xml version="1.0" encoding="UTF-8"?>
  <root root="true">
   <profile>
    <!-- self closed -->
   </profile>
   <Garage>
      <cars>
        BMW 
      </cars>
      <cars>
        Mercedes
      </cars>
      <bike>
        Kawasaki H2R  <!-- favorite -->
      </bike>
   </Garage>
   <original_paint>
      true
   </original_paint>
   <color wrapp:num="3785">blue</color>
</root>

Output:


_declaration:
  _attributes:
    version: '1.0'
    encoding: UTF-8
root:
  root: 'true'
  profile: {}
  Garage:
    cars:
      - BMW
      - Mercedes
    bike: Kawasaki H2R
  original_paint: 'true'
  color:
    wrapp:num: '3785'
    _text: blue