Teknobench
Support

HTML Tag Remover

Remove HTML tags online and get clean plain text. Keep line breaks, list links and decode entities. Everything runs in your browser and nothing is uploaded.

Output
HTML characters
0
Text characters
0
Tags removed
0

How to use the HTML Tag Remover

  1. Paste your HTML source, or a fragment of a web page, into the Input box. Raw markup copied from a code editor, an email template or the developer tools works just as well.
  2. Choose the options you need: Keep line breaks for block tags, List links (text and address) and Collapse extra spaces.
  3. Read the result in the Output box. The counters for HTML characters, Text characters and Tags removed update as you type.
  4. Click Copy to put the text on the clipboard, or Clear to start again with an empty box.

What the tool removes and what it keeps

Every HTML tag is removed: the angle brackets, the tag names and every attribute, such as class, style or onclick. What remains is the text a visitor would read on the page. Entities are decoded by the same rules a browser uses, so &amp; becomes &, &lt; becomes <, and &eacute; becomes é. An entity is decoded once: the text &amp;lt; in the source comes out as &lt;, exactly as it was written.

The content of <script>, <style>, <template> and <noscript> elements is dropped with the tags. That content is code or styling, not text a reader sees. HTML comments are ignored.

The markup is read by the browser’s own HTML parser into a separate document that is never displayed. In that document nothing is loaded, no script runs and no image is fetched, so pasting untrusted markup into this tool is safe.

The three options

  • Keep line breaks for block tags: paragraphs, headings, list items, table rows and div elements each start a new line, and <br> is a line break. Turn the option off to get one continuous line, where blocks are separated by a single space.
  • List links (text and address): adds a list at the end of the output. Each line shows the text of a link followed by its address, for example - Our guide: https://example.com/guide. This keeps the sources of an article when you convert it to plain text. Links without an href attribute are skipped.
  • Collapse extra spaces: replaces runs of spaces, tabs and non-breaking spaces with one space, removes the spaces at the start and end of each line, and reduces several blank lines to one. Indented source code becomes easy to read again.

Typical uses

A web page copied from the developer tools is full of class and style attributes that you do not need. Remove the markup to get the wording alone, for a translation tool, a document or a social media post. An email template built in HTML can be turned into a plain-text version that some mail clients require. A list of links collected from a page can be exported as text with the addresses next to each label.

Inline tags such as <b> or <span> join the text on either side of them, exactly as a browser displays them. So <b>Hello</b>world becomes Helloworld. Add a space in the source, or turn on the line break option, when the words must stay apart.

Limits to keep in mind

This tool shows the text that is in the markup. Text that a script writes into the page while it runs is not in the source, so it does not appear. Broken markup is repaired the same way a browser repairs it, which can move a tag or a word to another place.

The tool is not a security filter. It produces plain text, but it does not check whether the original HTML was safe to display. If you need HTML that is safe to show on a site, clean it with a sanitizer in your own software.

Frequently asked questions

Does this tool send my HTML to a server?

No. The parsing, the options and the counters all run in your browser, in this page. The text you paste is not uploaded, stored or logged by this tool.

Why is the text of a script missing from the output?

Script and style elements contain code and CSS rather than text that readers see, so they are removed together with their content. The same applies to template and noscript elements.

What does "decode entities" mean?

HTML writes some characters as codes, called entities. The number sign and name form &#233; and &eacute; both stand for é. The tool turns them back into the characters they represent, once, so the output reads as the page does.

Can I get a list of all the links in a page?

Yes. Turn on List links (text and address). Each link found in the markup is listed at the end of the output with its text and its href address. Links whose text is empty show only the address.

Why are some words joined together in the result?

Inline tags such as <b>, <em> or <span> do not add any space, which is how HTML itself works. Turn on Keep line breaks for block tags and separate your blocks in the source, or add a space by hand after the output.

Is this tool enough to make HTML safe to display?

No. It is designed to read text from markup, not to clean markup for display. Keep the original source in a separate place and use a dedicated sanitizer if you publish the markup on a website.