About the HTML to Text
Strip HTML tags from a snippet or a whole page and keep only the readable words, laid out the way a browser shows them. Paste markup copied from a web page, an email template, a CMS field or a database export, and this HTML to plain text converter removes every tag, starts a new line for each paragraph, heading and list item, and drops scripts and styles. What's left can go straight into a spreadsheet, a text message, a word counter or a plain-text email.
Entities are turned back into characters as well: & becomes &, " becomes ", © becomes ©, and numeric codes such as – become the character they stand for. The result updates as you type, entirely in your browser.
How the HTML becomes plain text
The converter reads the markup tag by tag. A tag starts with < followed by a letter or a slash and ends at the next > that isn't inside a quoted attribute, so a link written as <a href="x>y"> is still removed cleanly and a comparison such as a < b in your text is kept. Comments, the <!DOCTYPE> line and the whole content of <script>, <style>, <head>, <template> and <noscript> are dropped, because a browser doesn't show them as text.
Block elements start a new line: <div>, <li>, <tr>, <br>, <blockquote> and the like. Paragraphs and headings (<p>, <h1> to <h6>) are separated by an empty line. Table cells on the same row are separated by a tab, so a pasted table lines up when you drop it into a spreadsheet.
Inside ordinary text, every run of spaces, tabs and line breaks becomes one space, which is how a browser renders it. Text inside <pre> keeps its exact spacing and line breaks. Entities are decoded last, so an escaped tag such as <b> comes out as the visible text <b> instead of being deleted.
1. drop comments, <script>, <style>, <head> 2. block tags, <br> → new line 3. <p>, <h1>-<h6> → empty line between 4. </td>, </th> → tab 5. remove other tags, collapse spaces 6. decode entities
The counter under the input box gives the word and character totals of the HTML you pasted. Compare them with the plain result to see how much of a fragment was markup.
Assumptions and limits
- Line breaks that sit inside a paragraph in the source are treated as spaces, as a browser does. Use <br> or separate <p> tags if you want the plain text to break there.
- Lists keep one item per line, but bullets and numbers are not added in front of the items.
- Links keep their text only; the address in href is not written into the result.
- Common named entities are decoded: the five used in markup (&, <, >, ", '), all the Latin-1 letters and signs such as é and ©, typographic ones such as ’, — and …, and many arrow, maths and currency signs. Numeric codes always work. A rare named entity outside that list is left as written.
- becomes an ordinary space, so text copied into another app wraps normally.
Worked examples
Strip HTML tags from a price line
A product line pasted from a shop's page source. The p tag is removed and three entities are decoded, giving text you can drop into a message or a CSV column.
Input: <p>Fish & chips cost < $10</p> Output: Fish & chips cost < $10
An HTML list to plain text
Each list item becomes its own line, and the indentation from the source is not carried over.
Input: <ul> <li>Milk</li> <li>Eggs</li> </ul> Output: Milk Eggs
Minified HTML on a single line
Even with everything on one line, the heading and both paragraphs come out as separate blocks with an empty line between them.
Input: <h1>Title</h1><p>First para.</p><p>Second para.</p> Output: Title First para. Second para.
HTML and what the converter returns
Left: what appears in the HTML source. Right: what you get in the plain text.
| In the HTML | In the plain text |
|---|---|
| & < > " ' | & < > " ' |
| | Normal space |
| © é ’ — | © é ’ — |
| – or – | – (any numeric code) |
| <br>, <div>, <li>, <tr> | New line |
| <p>, <h1> to <h6> | Empty line between blocks |
| <td>, <th> | Tab between cells |
| <script>, <style>, <head>, <!-- comment --> | Removed with their content |
| <pre>…</pre> | Spacing and line breaks kept |
How to use the HTML to Text
- Paste the HTML. Clear the sample sentence and paste your markup into the Input Text box, from a short snippet to a full page source.
- Read the plain text. The Result box shows the text immediately, with paragraphs and list items on separate lines; Clear empties the input when you want to start again.
- Copy it. Press Copy above the Result box and paste the plain text wherever you need it.
Frequently asked questions
How do I strip HTML tags from text?
Paste the markup into the Input Text box. Every tag and its attributes are removed at once and the remaining words appear in the Result box, with paragraphs on separate lines and entities such as & turned back into normal characters. Press Copy to take the plain text with you.
Are my paragraphs kept apart?
Yes. Each paragraph and heading is separated from the next by an empty line, and each list item, table row, <div> and <br> starts a new line, even when the source HTML is minified onto a single line.
Does it remove JavaScript and CSS from a page source?
Yes. The content of <script> and <style> blocks is dropped along with the tags, and so is everything in <head>, such as meta tags. Only the text a reader would see on the page is left.
Why does an entity still appear in my plain text?
Only if it is a rare named one that isn't in the converter's list. All numeric codes and the common names, including ", ©, ’, —, € and accented letters, are decoded. A find-and-replace afterwards clears any that remain.
Is the HTML I paste uploaded anywhere?
No. The tags are removed by JavaScript running in this browser tab, and nothing you paste is sent to a server. You can paste internal email templates, customer data exports or unpublished drafts without them leaving your device.
This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.