HTML to Text
Strip HTML down to clean, readable plain text — links, lists, and paragraphs preserved, scripts and styles removed.
Strip any HTML down to clean, readable plain text — paragraphs become line breaks, list items become bullets, table cells get tabs, and scripts, styles, and iframes never leak into the output. Parsed with the browser’s own HTML engine, so entity decoding is exact.
How to use HTML to Text
- Paste the HTML source or a copied rich-text fragment.
- Choose whether to keep link URLs and image placeholders.
- Copy the clean text.
Who it is for
Writers salvaging copy from web pages, support teams converting email HTML into plain text, data cleaners extracting article bodies, and anyone who pasted rich text and got a wall of tags.
How it works
- Block-level elements produce line breaks in the right places, list items get a bullet prefix, and table cells are separated by tabs so rows stay readable.
- Script, style, noscript, template, iframe, and SVG content is removed before extraction — no hidden code in the output.
- Optional toggles append link URLs after link text and mark images as [image: alt text].
What it cannot do
- Visual styling (bold, colour, fonts) has no plain-text equivalent and is dropped — that is what "plain text" means.
- Deeply nested layouts can produce a couple of extra blank lines; the output is trimmed and collapsed to at most one blank line between blocks.
Sample input & output
<article><h1>Release 2.4</h1><style>.ad{display:none}</style><p>Read the <a href="https://example.com/changelog">notes</a> & upgrade.</p></article>
Release 2.4 Read the notes (https://example.com/changelog) & upgrade. — <style> stripped, & decoded, and link URL kept inline.
Frequently asked questions
Where did the <script> content go?
Removed on purpose. Scripts and styles are code, not content, and they must never appear in plain-text output.
Are HTML entities decoded?
Yes — the browser’s own parser decodes &, <, and numeric entities exactly as a web page would.
Can I keep the links?
Tick "Show link URLs" and every link renders as link text followed by its href in parentheses.
Why is stripping HTML with a regular expression like /<[^>]+>/g broken on real web pages?
A naive tag-stripping regex deletes <style> and <script> tags while dumping all the raw CSS rules and JavaScript code between them straight into your output, glues adjacent paragraphs (<p>One</p><p>Two</p>) into "OneTwo" with no line break, leaves numeric entities like — undecoded, and misfires whenever an attribute value contains a '>' character.
How does DOM-based extraction protect privacy and prevent XSS when pasting untrusted HTML?
Parsing HTML inside an inert DOMParser document builds an in-memory node tree where <script> elements do not execute and inline event handlers never fire, then removes <script>, <style>, <noscript>, <template>, <iframe>, and <svg> subtrees completely before walking text nodes. Be aware that browsers can still prefetch some resource hints in edge cases, though nothing is uploaded to PDF Tura.
How are HTML tables, bulleted lists, and heading blocks formatted in plain text?
To preserve scannability without visual CSS boxes, block elements (<p>, <div>, <h1>–<h6>, <blockquote>, <section>) insert clean paragraph breaks, <li> items receive bullet prefixes, and <tr>/<td> table rows separate cells with horizontal tabs (\t) and rows with newlines — allowing pasted tables to remain readable in plain-text emails or re-paste cleanly into spreadsheets.
When should I enable the link-URL and image-placeholder options?
Keep link URLs enabled when generating plain-text multipart/alternative email bodies (RFC 2046) from HTML newsletters or archiving legal web notices, where turning "Reset your password" into plain text without its target URL makes the email unusable. Turn both toggles off when feeding scraped web articles into word counters, readability checkers, or AI summarizers where raw URLs add noise.