About html to text converter
Strip HTML tags and get plain text, keeping paragraphs, lists and links readable.
Uses
- Creating the plain-text version of an email.
- Counting words in a web page.
- Preparing text for analysis.
A worked example
An email template with a table layout, images and links is reduced to plain paragraphs, and link addresses can be shown in brackets. The result works as the plain-text part of an email, which spam filters and some readers expect.
What is kept and lost
- Paragraphs and list items become lines of text.
- Images, styles and scripts are removed.
- Hidden elements may or may not be removed, so check the output.
Entities and links
HTML entities such as & and are turned into normal characters, and link addresses can be listed beside the text, so the plain version stays useful.
Email use
Always send a plain-text alternative with HTML mail. It improves delivery and works for people who prefer text only.
