FormatterHQ

YAML Converter

One input, five outputs: convert the same YAML to JSON, XML, CSV, TOML or an HTML table by clicking the format you need.

Input YAML
Output JSON
Ready.

How to use the YAML Converter

  1. Paste YAML into the input editor, upload a .yaml file, use Load URL, or click Sample.
  2. Click a target: To JSON, To XML, To CSV, To TOML or To HTML.
  3. Adjust the Indent for JSON or XML output if needed.
  4. Copy the result or Download it; for HTML, open the Preview tab to see the rendered table.

A YAML converter for every common target format

When the same YAML needs to go to several places, a single-purpose converter means pasting it again and again. This YAML converter keeps your input in one editor and gives you a button per output format. It is useful for comparing how data looks in each format, for deciding which one a downstream tool should use, or simply for converting a file you are not sure what to do with yet.

What each button produces

ButtonOutputTypical use
To JSONIndented JSON of the full documentAPIs, JavaScript, databases
To XMLXML with a root element, list items repeatedLegacy systems and XML-only importers
To CSVRows from the list of records, nested keys as dot columnsSpreadsheets and bulk imports
To TOMLTables and arrays of tablesConfig files for Rust, Python and static-site tools
To HTMLAn HTML table (nested tables for nested data)Docs, wikis, emails

Example

team: platform
members:
  - name: Priya
    skills: [go, k8s]
  - name: Liam
    skills: [js]

To CSV picks the members list as the table:

name,skills.0,skills.1
Priya,go,k8s
Liam,js,

To TOML keeps the whole document:

team = "platform"

[[members]]
name = "Priya"
skills = [ "go", "k8s" ]

[[members]]
name = "Liam"
skills = [ "js" ]

To HTML produces a two-column table for the top-level mapping with a nested table for the members, and the Preview tab renders it.

Format limits to keep in mind

  • CSV can only hold one table. Plain values next to the list of records (like team above) are not included.
  • TOML has no null, so null values are omitted and the status bar tells you how many. A top-level list is wrapped under an items key.
  • XML element names cannot contain spaces or start with digits; such keys are adjusted with underscores.
  • JSON is the only target that preserves every value exactly, apart from YAML-only details such as comments, anchors and special floats like .inf.

A practical workflow

Because the input stays put while you switch outputs, you can check a file from several angles in a minute. Start with To JSON to confirm the data parsed the way you expect, look at To HTML in the Preview tab to scan it as a table, then export the format your target system needs. If one output looks wrong, the problem is almost always in the YAML itself, such as a key indented one level too deep, and fixing it there corrects every format at once.

Parsing rules that apply to every target

All outputs start from the same parse, so YAML typing rules affect every format: unquoted 1.10 becomes 1.1, 007 becomes 7, and yes/no stay strings under YAML 1.2. Multi-document files become a list with one entry per document. If the YAML is invalid, every button reports the same error with its line and column.

Need more options?

The dedicated pages expose settings this all-in-one page keeps at their defaults. Use YAML to XML to rename the root and item elements or create attributes, YAML to CSV for delimiters and quoting, and YAML to JSON for sorted keys.

Privacy

All conversions run locally in your browser. Content goes to our server only when you use Load URL or Save & Share.

Frequently asked questions

Which output format should I choose for my YAML?
Use JSON for programs and APIs, CSV for spreadsheets, TOML for configuration files in the Rust and Python ecosystems, XML for systems that require it, and HTML when people need to read the data on a web page.
Why is some data missing from the CSV output?
CSV holds a single table. The converter uses the list of records it finds and leaves out values outside that list. JSON, XML, TOML and HTML keep the entire document.
Can I convert YAML to Excel here?
Not from this page. Use the YAML to Excel converter, which downloads a real .xlsx workbook.
Does the converter keep my YAML comments?
No. Every output is built from the parsed data, and comments are not part of it.

Last updated October 3, 2026

Related tools