en

YAML to XML

Convert a YAML file to XML locally - the same structure as well-formed markup, no upload, right in your browser. No daily cap.

Running locally on your device ...

Advanced
Root element name
Array/sequence item element name
Indentation
  • 2 spaces
  • 4 spaces
  • Tab
  • Compact (single line)
Write null values as xsi:nil instead of an empty element

Running locally on your device ...

0%

Is my file uploaded?

No. Everything runs in your browser - your file never leaves your device. How this is verifiable

No upload100% local
Your content stays with youno third-party access
Hosted in GermanyGlobal Content Delivery
Independently auditedTLS A+ · HTTP headers A+

YAML is the widespread configuration format for CI pipelines, Docker Compose and Kubernetes - with indentation instead of brackets. XML is the established markup format for data exchange, office documents, RSS feeds and many enterprise interfaces - with tags and attributes. This tool reads your YAML file and writes the same structure as well-formed XML.

The conversion runs entirely locally in your browser: js-yaml reads the YAML, fast-xml-parser writes the XML, both pure JavaScript. Mappings become nested elements, sequences become repeated elements, scalars become element text. An XML document needs exactly one root element; if your YAML has several top-level keys or is a sequence, the content is placed neatly under a root element so the result is always well-formed. The same applies when the only top-level key holds a sequence.

Keys carrying the @_ prefix are turned back into real XML attributes, matching the XML to YAML counterpart - so a round-trip survives the structure. It stays honest about it: YAML timestamps are written into the XML as ISO 8601 text, because XML has no date type of its own. The result is indented, readable XML with a declaration header. Nothing is uploaded.

No file-count or daily limits, no account, no paywall, no watermark. Only your device limits the size - up to 2 GB per run. Many online services limit free use to a few runs per day or require an account; here everything runs locally in your browser - with no daily quota and no sign-up.

Specifications

Specifications
Input formatsYAML, YML
Output formatXML
Batch processingNo
ProcessingLocally in your browser (JavaScript)
File uploadNone

In 3 steps

  1. Drop or pick your YAML file.
  2. The tool converts it into XML.
  3. Download the XML file.

Limitations: The result is always well-formed XML. Mappings become nested elements, sequences become repeated elements, @_ keys become XML attributes. A single top-level key becomes the root directly, as long as its value is not an array; otherwise - with several keys, a sequence at the root, or a purely attribute-only key - the content is placed under a root element. Keys that are not valid XML element names (spaces, a leading digit, special characters, an empty name) are sanitised deterministically (an invalid character becomes _, a leading digit gets a _ prefix, an empty name becomes _); the original name is kept in a name="..." attribute, and name collisions created by this sanitising are reported as a hint. YAML timestamps are written as ISO 8601 text (XML has no date type). YAML comments are lost on read, since XML cannot represent them in the same place. Control characters not allowed in XML 1.0 are replaced with the Unicode replacement character (U+FFFD) and reported as a hint. Invalid YAML is rejected with a clear message. Lists placed directly inside a list (such as [[1, 2]]) become one <item> element per inner list; converting back to YAML returns them as an object with an item list rather than as a nested list. Attribute names after "@_" are sanitised by the same rule as element names; an attribute whose value is an object or a list, or whose sanitised name collides with another attribute, becomes a child element instead, with the original key kept in name="...". Emoji are not allowed in XML names, so in keys they are replaced with _ characters as well (original in name="..."); in values they stay unchanged. U+FFFE, U+FFFF and lone surrogate characters are also replaced with U+FFFD. YAML nested more than about 100 element levels deep - including depth that only arises through anchors and aliases - is rejected with the yaml-to-xml_too_deep error instead of producing a broken file.

FAQ

Is my file uploaded?

No. The conversion runs entirely locally in the browser - nothing is sent.

What if my YAML has several root keys?

The content is placed under a root element so the XML has exactly one root element.

Are attributes supported?

Yes. Keys with the @_ prefix become real XML attributes, matching XML to YAML.

How are timestamps handled?

As ISO 8601 text, because XML has no date type of its own.

Does the reverse work too?

Yes, with our "XML to YAML" tool.

Is YAML to XML free - are there any limits?

Yes. You can use YAML to XML as often as you like: no daily cap, no account, no paywall, no watermark. All selected files together may be at most 2 GB per run; on devices with little memory this bound is lower, because it follows your device's memory.

Related tools

XML to YAML · JSON to XML · YAML to JSON · JSONL to JSON · JSON to JSONL · JSON to Markdown