Turning a product description from HTML into plain text
Online shops, CMS exports and email builders often hand you text wrapped in HTML. To put it somewhere that only takes plain text, such as a marketplace listing, a text message or a spreadsheet cell, the tags have to go. Deleting them by hand is slow, and a quick find-and-replace usually leaves lines run together or entities such as & behind.
Here is a typical product description. It has a heading "<h2>Trail Mug</h2>", a paragraph "<p>Keeps coffee hot for <b>6 hours</b>.<br>Dishwasher safe.</p>", and a list "<ul><li>350 ml</li><li>Steel & bamboo</li></ul>". Stripped with bullets on, the text reads "Trail Mug", a blank line, "Keeps coffee hot for 6 hours." and "Dishwasher safe." on two lines, a blank line, then "• 350 ml" and "• Steel & bamboo". The bold tags are gone, the <br> became a line break, and & became a plain &.
Switch bullets off and the last two lines become "350 ml" and "Steel & bamboo" with no marker, which suits a spreadsheet column. Numbered lists work the same way: with bullets on they keep their numbers, starting from the number the list itself starts at.
Tables are laid out for pasting into a spreadsheet. A row "<tr><td>Size</td><td>350 ml</td></tr>" becomes "Size", a tab, then "350 ml". Paste a block of those rows into Excel or Google Sheets and each value lands in its own column. Whitespace in the source, such as the indentation an editor adds, collapses to single spaces, as it does when a browser shows the page.
The tool has limits. It keeps text only, so link addresses, image descriptions and all formatting are lost; use HTML to Markdown if you need the links. Text that a page draws with CSS, such as content added in a style sheet, is not in the HTML and cannot appear here. Text written by a script after the page loads is not in the source either. And input over one million characters is refused rather than slowing the page.