Back to Tools

HTML to Text

Strip HTML tags and extract clean, readable plain text from your code

0
HTML Source
1

Get the readable words out of HTML markup

Copying text from a rendered web page brings along formatting you may not want, and copying from the source brings a mess of angle brackets. This converter takes pasted HTML and returns only the text a visitor would read, with tags removed and entities such as ampersand codes turned back into normal characters. A Words counter in the header shows the length of the result.

Converting a snippet

  1. Put your code into the HTML Source editor using typing, the Paste button, or Load Sample for a short example that includes a heading, a list and a link.
  2. Decide on the two checkboxes. Preserve Line Breaks is on by default; Strip Links is off.
  3. Click Extract Plain Text.
  4. Read the outcome in the Extracted Plain Text panel, then press Copy or Download to save a file named extracted-text.txt.

What the two options do

  • Preserve Line Breaks adds a new line after headings, paragraphs, divs, list items and br tags, so the layout of the original paragraphs survives in the text.
  • With it switched off, all whitespace is squeezed into single spaces and you get one continuous run of text, which suits pasting into a single-line field.
  • Strip Links removes each anchor element completely, including its visible label. Use it when you want the prose without link captions, not when you merely want the URLs hidden.

Who benefits

  • Writers moving copy out of a CMS or email template into a plain document.
  • Developers building a plain-text alternative part for an HTML newsletter.
  • Analysts counting the actual words in a page's markup.
  • Anyone pasting HTML from a support ticket or export who needs to read the message without the tags.

Edge cases

The conversion happens in your browser by placing your code inside a temporary element. Because that element is never displayed, content inside style and script tags can appear in the output, so delete those blocks first if they are present. Image alt text is not included, and list bullets or numbers are not added; each item simply becomes a line. Indentation in your source can produce extra blank lines when line breaks are preserved. Table cells are not laid out in columns; their text comes out in reading order. The word count splits on whitespace, so it is an approximate figure for languages written without spaces.

Related Tools


Frequently Asked Questions

Are bullet points kept in the plain text?
No bullet symbols or numbers are added. Each list item becomes its own line when Preserve Line Breaks is on. If you need markers, add a dash or number to the lines afterward in a text editor.
What happens to link URLs?
By default the link's visible text stays and the URL is discarded. Strip Links goes further and removes the whole anchor, text included. To collect the URLs themselves, use a link extractor before converting.
Why does my output include CSS or script code?
The tool reads text from a hidden temporary element, where the content of style and script tags is treated like ordinary text. Remove those blocks from your pasted HTML before converting and the extra code will not appear.
Does it decode entities like & and  ?
Yes. The browser interprets entities while parsing your markup, so ampersand codes and similar references come out as the characters they represent. A non-breaking space appears as a space-like character.
Is the word count exact?
It counts groups of characters separated by whitespace, which matches what most word processors show for English text. Results can differ for languages without spaces between words, or if numbers and symbols stand alone.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.