HTML to Text
Strip HTML tags and extract clean, readable plain text from your code
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
- 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.
- Decide on the two checkboxes. Preserve Line Breaks is on by default; Strip Links is off.
- Click Extract Plain Text.
- 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