About HTML to Text
Deleting the tags from HTML leaves a mess, with words run together, list items merged into one line, and é where an accented letter should be. This tool reads the HTML the way a browser would and writes out what a person would actually see, in reading order, with the line breaks in the right places.
It is useful when the destination cannot take markup. That might be the plain text part of an email, a spreadsheet cell, a text message, or a word count of an article without its code. It also works as a quick way to read a saved page without a browser.
You decide how much detail to keep. By default you get the words only. Two switches add link addresses and image descriptions, which matters for plain text email, where a link with no address is useless.
How it works
The HTML is parsed into a tree and walked from top to bottom. Whitespace is collapsed the way browsers collapse it, so indentation in the source disappears and text inside a <pre> block keeps its exact spacing. Block elements start new lines, paragraphs and headings get a blank line between them, and a <br> gives a single break.
Lists are written with - or numbered markers, with nested lists indented under their parent, and an <ol start="5"> starts counting at 5. Table cells are separated by tabs and rows by line breaks, so a table pasted from this output lands in separate spreadsheet columns.
Things a reader does not see are skipped: the page head, scripts, styles, comments, elements with the hidden attribute, and inline display:none or visibility:hidden. That removes the invisible preview text that marketing emails often carry. Entities are decoded in a single pass, so &lt; correctly comes out as <, and non-breaking spaces become ordinary ones.
How to use HTML to Text
- Paste the page source or an email's HTML on the left, use Open file, or press Try an example.
- Read the plain text on the right as it updates.
- Open Options and turn on Show link addresses or Show image alt text if you need them.
- Press Copy result, or Download .txt to save the file.
With Show link addresses turned on
<h1>Opening hours</h1>
<p>Café open <b>daily</b>.<br>Details on <a href="https://example.com">our site</a>.</p>
<ul><li>Mon-Fri: 7-19</li><li>Sat: 8-14</li></ul>
<table><tr><td>Coffee</td><td>€3</td></tr></table>
<script>track()</script>Opening hours
Café open daily.
Details on our site (https://example.com).
- Mon-Fri: 7-19
- Sat: 8-14
Coffee €3The entities were decoded, the script disappeared, and a tab separates the two table cells on the last line.
When it helps
- Writing the plain text version of an HTML email, with link addresses shown so readers can still follow them.
- Getting an accurate word count for an article, without tags inflating the number.
- Moving text from a saved web page into a document, with no fonts or colors coming along.
- Reading an HTML attachment or export when you would rather not open it in a browser.
Tips for a better result
- To copy a table into a spreadsheet, paste the output as is. The tabs put each cell in its own column.
- For content you plan to keep editing, HTML to Markdown preserves more, such as bold text and links.
- If a page looks unexpectedly short, its text may be loaded by JavaScript. Copy the rendered HTML from your browser's inspector instead of using View Source.
Good to know
- Only inline styles and the
hiddenattribute are checked. Elements hidden by a class in a stylesheet cannot be detected and will appear in the text. - The order is that of the source. A multi-column email layout built with tables is written cell by cell, which can read oddly.
- Lines are not wrapped to a fixed width, so add wrapping in your mail tool if it needs 72-column text.
- Images are left out unless you turn on alt text, and images with no alt attribute leave nothing behind.
- Drop-down options, video, audio, iframes and SVG are skipped.
- Named entities beyond HTML 4 and the basic punctuation set stay as written. All numeric references are decoded.
Questions people ask
Why is this better than removing everything between angle brackets?
That approach loses all structure, runs words from adjacent paragraphs together, and leaves script and style contents in your text. It also breaks on a real "<" in the content. Reading the document as a tree avoids all of that.
What happens to links by default?
You get the link text alone, so the output reads naturally. Turn on Show link addresses to write them as "text (address)". Links to anchors on the same page, such as "#top", are left out because they mean nothing once the page is gone.
Why does the result keep tabs in tables?
A tab is the separator spreadsheets and most editors recognize when you paste. Commas would collide with commas in the data. If you need true CSV with proper quoting, try the Data Converters category.
What to use next
- HTML to Markdown: if you want to keep emphasis, links and headings as markup
- Word Counter: to count the extracted text and check reading time
- Text to HTML: to go the other way and wrap plain text in tags
Last reviewed . Read our editorial policy.