turn HTML into a YAML treeDeveloper Tools
Turns HTML markup into a YAML tree of elements, attributes, and text.
This HTML to text converter strips the tags from a web page or email and keeps what matters: paragraphs, lists, and link addresses. Scripts and styles are removed and entities such as & are decoded.
The HTML is parsed with the browser's built-in DOMParser. It creates an inert document, so no script runs and no image or stylesheet loads. The converter then walks the document: block elements such as paragraphs and headings start new lines, list items get a bullet or number, table cells are separated by tabs, and runs of spaces collapse to one, as a browser would show them.
<p>Hello<br>world</p> → Hello and world on two lines.<a href="https://example.com">Docs</a> → Docs (https://example.com).<li>One</li><li>Two</li> → - One, - Two.Deleting everything between < and > leaves script code, CSS, and entity codes in the text, and runs paragraphs together. Reading the HTML the way a browser does keeps the structure: separate paragraphs, readable lists, and the link addresses you would lose otherwise. That makes the output usable for plain-text emails, notes, or feeding text into other tools.
Paste the HTML and copy the text. Tags, scripts, and styles are removed, and the structure is kept.
Yes. By default the address is written after the link text in brackets. You can switch to Markdown links or plain text.
Yes. The HTML is parsed as an inert document, so nothing in it runs or loads.
Often used together with the HTML to Text Converter.
Turns HTML markup into a YAML tree of elements, attributes, and text.
Encodes text into HTML entities and decodes named, decimal, and hex entities.
Beautifies HTML with consistent indentation, including inline CSS and JavaScript.