HTML to text converter
Everything runs in your browser; nothing is sent or stored.
- Paste the code in the "HTML code" field, and the text updates as you type. The code is read as text only: it is not shown on the page, scripts do not run, and images and links are not loaded.
- In the "Conversion type" section, choose "Readable text" or "Remove tags only".
- In the "Readable text options" section, you can add the link addresses in parentheses, and turn off collapsing spaces or keeping line breaks.
- An entity is decoded only when it ends with a semicolon, such as or $. An unknown entity stays as written. Table cells are separated by a tab.
- Below the result field, the tool shows the number of tags and comments removed and the number of characters in the result.
- Copy the text by clicking "Copy".
Readable text or remove tags only
When you convert to readable text, the page structure is kept with line breaks, bullets, and tabs, as shown in the examples on this page. Content that is not shown to the reader, such as script and style code, is removed from the text. When you remove tags only, the tags and comments are deleted, and everything else stays exactly as written, including the spaces, the entities, and the code inside script and style. The "Remove tags only" conversion type suits code whose text is already split into lines as needed, and code whose entities must stay as they are.
Entities and spaces
In readable text, HTML entities are decoded into characters, so & becomes & and $ becomes $. The "Collapse spaces as a browser does" option turns several consecutive spaces and line breaks in the code into one space, and spaces inside the pre tag are kept as they are. The entity becomes a non-breaking space, which looks like a normal space but is a different character. To replace non-breaking spaces with normal spaces, move the text to the "Text cleaner and editor" tool and select its "Remove hidden and direction characters" option.
Common uses
A newsletter is usually sent in two versions, HTML and plain text, and the text version is shown in email programs that do not display HTML. Converting a page or an article to text also helps you move content between systems, prepare a summary, count words, and check the text that actually appears on the page. When the code comes from an editor that adds unnecessary tags, converting it to readable text gives you only the content, so you can format it again.
Sample tags and their result in readable text
<br>a line break.<p>a blank line before and after the paragraph.<li>a list item, on a new line that starts with a hyphen. In a nested list, the item is indented by 2 spaces.<ol start="3">a numbered list whose numbering starts at 3.<td>a table cell. Cells in the same table row are separated by a tab.<a href="...">the link text, and when the "Link address in parentheses after the text" option is selected, also the address in parentheses.<!-- note -->a comment in the code, which both conversion types remove.
HTML to text converter FAQ
Is the alternative text (alt) of images included in the result?
No. The alternative text of images is not included in the result, because images are removed completely. A link that contains only an image is shown as its link address when the "Link address in parentheses after the text" option is selected, and when the option is not selected, the link does not appear in the result.
Is the page title (title) included in the text?
No. The page title is not included in the readable text, because the title is in the head section, whose content is removed. The content of svg, iframe, and select is not included in the readable text either.
How are links shown when the "Link address in parentheses after the text" option is selected?
When the link text is the same as the address, the address is not shown twice. This also applies to mailto: and tel: links whose text is the address without the prefix. Links to an anchor on the page, which start with #, and javascript: links are shown without an address.
Can I convert invalid HTML code?
Yes. You can also convert code with missing closing tags, for example, paragraphs or list items that were not closed. The tool closes the missing tags by the common HTML rules, for example, a paragraph closes when a new paragraph starts. A tag cut off at the end of the code is left out, and a < character that is not followed by a letter stays in the text, for example, in the expression 2 < 3.
Why does all the text appear on one line?
When the "Keep line breaks" option is not selected, line breaks and tabs become spaces, and all the text appears on one line. Clearing this option is useful for preparing text for a single-line field, such as a meta description.
What is the maximum size of the code?
The code can be up to 1 MB, measured by its size in UTF-8. For larger code, an error message appears instead of the result.