Tool guide
About this tool.
HTML to Plain Text reads markup the way a browser reads it, including end tags that HTML lets you leave out, such as a missing </li> or </p>. It then writes only what a reader would see. Tags, comments and the doctype disappear, and so do the contents of head, script, style, template and svg.
Entities are decoded, so < becomes < and & becomes &. Runs of spaces, tabs and line breaks collapse to one space, as they do on screen. A no-break space ( ) is kept as a no-break space.
Paragraphs, headings, block quotes, lists, tables, figures, pre blocks and horizontal rules are separated by a blank line. Other block elements such as div get a single line break, and so does br. A horizontal rule becomes ---.
List items start with - or with a number. An ordered list honors its start attribute. Each nested list is indented by 2 more spaces. Table rows go on separate lines, and their cells are separated by tabs. A block element inside a table cell becomes a space. Images become their alt text. Text in pre and textarea keeps its inner spacing and line breaks, but trailing spaces on each line are trimmed.
Paste HTML as the main input, or select it in the editor.
Choose how links are written: Text only, or Text and URL.
Run the tool. Block elements become line breaks and blank lines, and inline tags such as b and span disappear.
Copy the result, replace the selection with it, or save it as text.txt.
- <p>Hello <b>world</b></p> → Hello world
- <ul><li>One<li>Two</ul> → - One and - Two on separate lines
- <ol start="3"><li>a</li></ol> → 3. a
- <a href="https://x.dev">docs</a> with Text and URL → docs (https://x.dev)
- <p>a <b></p> → a, a no-break space and <b>
- Processing is local; nothing is uploaded.
- Limits: 5,000,000 UTF-16 units of input, 100,000 nodes and 100 nesting levels.
- Output lines have no trailing spaces, and the text ends with one line break.
- CSS is not applied, so elements hidden with display: none still appear in the text.