Convert XML to YAML
Turn XML into YAML that is easier to read and edit. Attributes are kept as keys with a prefix, and malformed XML is reported with a line and column. All local to your browser.
- Unlimited runs
- No data leaves the tab
- Attributes kept
- 2 or 4 space indent
- Runs on your device. Files are never uploaded.
- Free and unlimited. No sign-up, no watermark.
XML to YAML in three steps
No account, no email, no waiting for an upload.
- STEP 01
Start with your XML
Any well-formed XML works.
- STEP 02
Set the options
Choose the attribute prefix, whether numbers and true/false become real values, and the indent.
- STEP 03
Copy or download the YAML
Nested elements become nested maps, repeated elements become lists.
What XML to YAML does, and what it doesn't
We'd rather tell you up front than surprise you after the download.
What you get
- Attributes preservedAttributes are written as keys such as @id, so they stay distinct from child elements.
- Text content keptWhen an element has text and attributes, the text is stored under #text.
- Typed values on requestConvert numeric and true/false text into YAML numbers and booleans.
- Repeated elements as listsSiblings with the same name become YAML list items.
- Syntax checkedErrors show the line and column.
Good to know
- Single vs repeated elementsAn element that appears once is a map, and one that repeats is a list. Code reading the YAML should allow for both.
- Comments and declarations are droppedYAML output holds data only.
- Tabs cannot indent YAMLChoosing Tabs in the indent list writes 2 spaces.
Your data never leave your device
The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.
Typical online tool upload
Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.
Mediaextractr no upload
The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.
When people use XML to YAML
Migrate configs
Move settings from an XML-based tool to a YAML-based one.
Review structure comfortably
YAML has less punctuation than XML.
Prepare CI or deployment files
Start from XML you already have.
Compare formats
Show the same data in both syntaxes.
Mediaextractr vs typical upload tools
| MediaextractrPrivate | Typical upload tools | |
|---|---|---|
| Your file is uploaded | Never | Yes |
| Sign-up needed | No | Often, after a few files |
| Daily file limit | None | Often 1–2 free files |
| Watermark | Never | Sometimes |
| Wait for upload & download | No | Yes |
| Speed on very large files | Depends on your device | Depends on their servers |
How XML maps to YAML
Each element becomes a key. Child elements become nested keys, repeated children become a list, and text becomes a value. Attributes are written with a prefix so they sit beside the child elements without clashing.
That is the same mapping used for JSON, then written in YAML's indentation style.
Namespaces are not resolved: a prefix like dc:title stays part of the key name, so the YAML mirrors the source exactly.
After converting
Review the result before using it:
- Check that lists appear where you expect them.
- Quote or edit values that YAML might read as another type.
- Validate with the YAML validator.
- Convert to JSON instead with XML to JSON, or go back with YAML to XML.
A small example: XML to YAML
An XML list of three server elements, each with a name attribute and a port child, becomes a YAML key called server holding a list of three items with @name and port. Use the attribute prefix setting to turn @name into something simpler, such as _name, or to drop attributes entirely.
Questions, answered
How do I convert XML to YAML?
Paste the XML and copy the YAML it produces.
How are XML attributes shown?
As keys starting with a prefix, @ by default.
Does my XML get posted to a server for conversion?
No. The conversion runs in your browser tab. Nothing is uploaded.
Can numbers be read as numbers?
Yes. Switch on the typed-values option and numbers and booleans are written as real YAML values.
Why do some elements become lists?
Elements that repeat under the same parent are collected into a list.
Can I convert from a tablet?
Yes. Paste or open the XML in a current tablet browser and copy the YAML.