SmartTechnology solutions for business

Convert HTML to Plain Text

Extract text from pasted HTML, optionally keeping headings, lists, and links.

Your result

Paste HTML. The plain text appears here.

How to use it

  1. Paste the HTML.
  2. Keep or clear headings, lists, and links.
  3. Copy the text or download plain-text.txt.

Examples

  • Paragraph<p>Hello <b>world</b></p> Hello world
  • Heading and list<h1>Title</h1> and a list A and B # Title, then - A, then - B
  • Link<a href="https://x.test">Site</a> Site (https://x.test)
Tool details and privacy

Turn pasted HTML into text. Headings can stay as #, and lists and safe link addresses can stay too. Code inside script is not run.

Useful for taking the text of a message or a page you copied from the browser without running what is inside it.

Options

  • Keep headings as # marks, list markers, and safe link addresses.

Limits

  • Up to 100,000 characters.
  • script, style, and comments are removed and are not run.
  • A javascript: address is dropped and the link text remains. Site with javascript:alert stays Site. A link whose text is its own address is written once.
  • Cells in a table row are separated by a tab. Images are dropped, including their alt text.
  • Nested lists are flattened. A numbered list starts at 1 and does not read the start attribute.
  • Repeated spaces outside pre become one space. Numeric entities and common named ones such as &amp;, &nbsp;, &copy;, and &mdash; are decoded. A named entity outside that list stays as written.

Privacy

The HTML is converted in your browser. It is not sent to any server and it is not stored.

Questions

How do I convert HTML to text?

Paste the markup. <p>Hello <b>world</b></p> becomes Hello world.

Is code in the page run?

No. <script>alert(1)</script><p>ok</p> becomes ok. The contents of script are removed.

Are links kept?

When the option is on, and the address is http, https, mailto, or a path that starts with /. A javascript address is not added.

Does it keep nested lists?

No. Nested lists are flattened with a - marker, or numbering that starts at 1.

Related tools

All tools