Skip to main content
Back to tools

HTML to Text

Strip HTML tags and extract clean plain text from markup

About HTML to Text

Extracts the text from a block of HTML: paste the markup, click Strip HTML and copy the plain-text result. The input is parsed by your browser's DOMParser without being rendered, so the output keeps the line breaks and indentation of your source rather than the visual layout. Useful for pulling copy out of email templates, CMS exports or scraped pages.

Category: Text.

Frequently asked questions

Does this preserve whitespace and newlines?

▾

It keeps the whitespace already present in your source, including line breaks and indentation between tags, but it doesn't add breaks for block elements or <br>. Markup written on a single line, such as <p>One</p><p>Two</p>, comes out as OneTwo.

Are HTML entities decoded?

▾

Yes. Entities like &amp;, &lt;, &gt;, and &nbsp; are decoded to their plain-text equivalents because the browser parser handles them before extracting the text.

What happens with script and style tags?

▾

Script and style elements are removed before text extraction so that JavaScript code and CSS rules do not appear in the output.

Is any text lost during conversion?

▾

Attribute text such as image alt or title values is not included, and neither is anything inside <head>, like the page title. Text hidden with CSS or the hidden attribute is kept, because the HTML is parsed but never rendered.

Related tools