fileview.dev

Convert XML to YAML

Convert XML to YAML in your browser: load your XML, choose YAML as the target, and download the result. The converter reports exactly what it could not carry across, and nothing is uploaded to a server.

Convert XML to YAMLRuns in your browser. Nothing uploaded.

When you need this

Moving an old XML configuration to the YAML a newer version of the same tool expects. Common when a project migrates from Ant or an XML-descriptor build to something modern, and someone has to port the settings without retyping them.

How to convert XML to YAML

Load your XML
Drag the .xml file in, or paste the document. A response captured from a SOAP or REST endpoint can go straight in as text. Nothing leaves your browser at this or any later step.
Choose the target format
Press Ctrl+Shift+K (Cmd+Shift+K on a Mac) to open the conversion panel, then pick YAML as the target. The source and the result sit side by side.
Read the loss report
The panel shows whether the conversion is lossless for your particular data, and lists every value it had to transform. Adjust indentation, key sorting and null handling if you need to.
Take the YAML
Download the .yaml file, copy it, or open it as a new tab to keep working on it in the YAML views.

What survives the conversion

XML to YAML cannot be lossless, because the two formats express different things. Same limitations as XML to JSON.

A worked example

A nested element with an attribute:

<server port="80"><host>localhost</host></server>
XML in
server:
  host: localhost
  "@_port": 80
YAML out

Privacy

The conversion runs in your browser — in a Web Worker for anything above a quarter of a megabyte, so the page stays responsive. Your data is not uploaded, not logged and not stored. There is no account, and the whole thing works offline.

Convert XML to YAML

Questions

Why is my port a number when the XML said port="80"?

Because XML has no types of its own, so the converter infers them from the text, and 80 reads as a number. That is right for a port and wrong for a zero-padded reference like 007, which would lose its leading zeros. Turn type inference off in the conversion panel when a field is an identifier.

Is converting XML to YAML lossless?

No, and no tool can make it so. Same limitations as XML to JSON. The converter lists every affected value rather than silently dropping it.

Is my XML uploaded to a server?

No. The file is read and converted by your browser. Nothing about its contents is sent anywhere, which you can verify in your browser’s network panel or by using the tool with the network disconnected.