HTML to Text Converter (Strip HTML Tags)

Strip HTML tags to clean plain text or Markdown, dropping script and style contents, turning block elements into line breaks, and decoding HTML entities.

Try one:
Set up for:
Plain text
Plain text will appear here…

What this HTML to text tool does

Paste any HTML snippet or full page source and this tool returns clean, readable plain text. It removes every tag, throws away the contents of <script> and <style> blocks, and turns block elements like <p>, <div>, headings and <br> into real line breaks so the layout still reads naturally. Common HTML entities such as &amp;, &lt;, &gt;, &quot;, &#39; and &nbsp;, plus numeric references like &#65;, are decoded back to normal characters — the rest of the HTML 4 named set too — and, unless you untick “Collapse spaces and blank lines”, excess blank lines are collapsed. Set Output to Markdown and the same page comes out as Markdown instead, with its headings, emphasis, links, lists, quotes and code kept in Markdown’s own marks.

When the HTML is broken

This tool reads tags with pattern rules, not a browser's HTML parser, so it takes markup out but does not repair it. A tag that is never closed — a <p> or <b> with no end tag — is still removed and its text kept. A < that never reaches a > stays in the text as written. A <script> or <style> with no closing tag loses only its opening tag, so its code stays in the text, and an unclosed <!-- comment is dropped up to the next >, or left in as written when no > follows.

When to use it

Use it to pull the copy out of an email template, clean a snippet you copied from a web page, prepare text for word counting or translation, or strip markup before pasting into a plain-text field. Because the conversion is a deterministic set of rules rather than a live browser DOM, you get the same result every time. Paste the HTML in the box, or open an .html file of up to 5 MB, and copy the plain text from under it — no sign-up. “Try one:” loads an example (links, line breaks or a table) with the option it shows already ticked, and “Set up for:” picks the options for an email or chat message, a single line, or a Markdown document.

Frequently asked questions

Does it remove script and style code?

Yes. The entire contents of <script> and <style> blocks are dropped, along with HTML comments, so no JavaScript or CSS ends up in your plain text output. Broken HTML is not refused: tags are removed one by one, so an unclosed or misnested tag still comes out as its text, while a <script> or <style> with no closing tag loses only its tags and its code shows up as text. A < with no > after it stays as written.

Are HTML entities like &amp;nbsp; decoded?

Yes. Named entities — the common ones (&amp;, &lt;, &gt;, &quot;, &#39;, &nbsp;) and the rest of the HTML 4 named set, such as &eacute; and &frac12; — and numeric references in decimal or hex (like &#65; or &#x41;) are converted back to the characters they represent.

What happens to images?

By default they are dropped. Tick “Keep image alt text” and each image leaves its alt text in square brackets where it stood.

Can it write Markdown, what happens to links, and how big a file can it open?

Set Output to Markdown and headings, bold and italic, links, lists, quotes, code blocks and images come out in Markdown’s own marks, and the download is named .md. In plain text a link keeps only its words by default; tick “Keep link URLs” and it is written as text (URL), or as [text](URL) with “Write links as [text](URL)” — a link to # or javascript: still keeps only its words, and a link whose text is its own address is not written twice. Open file… reads an .html, .htm, .xhtml or .txt file of up to 5 MB.

Can an entity be decoded twice, and does &nbsp; become an ordinary space?

No to both. In plain-text output, entities are decoded in one pass from left to right, and only after the tags are gone, so &amp;lt; comes out as the text &lt; rather than as a < that could be taken for a tag, and a decoded & is never read as the start of another entity. &nbsp; becomes the no-break space it stands for rather than an ordinary space.