HTML to YAML Converter
Paste HTML containing tables or lists and get structured YAML — tables become lists of objects, and nested lists preserve their tree shape.
Last updated: May 26, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is HTML to YAML Converter?
HTML tables and lists encode structured data, but the markup is verbose and hard to parse with anything except a DOM library. YAML is a much more concise human-readable format that maps naturally onto both shapes: a table becomes a list of objects keyed by the column headers, and nested `<ul>`/`<ol>` lists become nested YAML lists.
This converter uses the browser's DOM parser to walk the HTML, detect tables or lists, and emit clean YAML. Column headers (from `<thead>` or `<th>` cells in the first row) become object keys. Cell values are quoted where YAML would otherwise mis-parse them (booleans, numbers, special characters). For lists, the tree structure is preserved with indentation.
How to Use HTML to YAML Converter
Choose the source: tables or lists.
Paste HTML containing the source elements.
The YAML output appears instantly.
Copy the YAML or download it as a .yaml file.
Common Use Cases
- Migrating data from an HTML data table into a YAML config file.
- Extracting Wikipedia-style HTML tables into structured YAML for processing.
- Converting an HTML outline (nested ul/ol) into YAML for use in a static site generator.
- Importing tabular HTML data into a tool that expects YAML input.
- Quickly producing a YAML fixture for tests from an HTML mock.
Example Input and Output
An HTML table with two columns becomes a YAML list of two-key objects.
<table>
<tr><th>Name</th><th>Role</th></tr>
<tr><td>Alice</td><td>Admin</td></tr>
<tr><td>Bob</td><td>User</td></tr>
</table>- Name: Alice
Role: Admin
- Name: Bob
Role: UserPrivacy
All conversion happens in your browser. No HTML or YAML is sent to a server.
Multiple tables
If your HTML contains multiple tables, each is emitted as its own YAML block with a comment header (# Table N) separating them.

