Options
HTML
Drop the file to open it
Plain text
The plain text appears here as you type.

Paste HTML and get clean plain text as you type. Paragraphs, headings, and line breaks stay readable, lists keep their bullets and numbers, and table cells are separated by tabs so they paste neatly into a spreadsheet. Scripts, styles, comments, and hidden content are dropped, and entities like & and   are turned back into normal characters. You can also strip tags without touching the spacing, flatten everything onto one line, or keep a few tags, like b and a, and remove the rest. Everything runs in your browser.

How to remove HTML tags from text

  1. Paste your HTML into the left pane, or open an .html file.
  2. The plain text appears on the right as you type.
  3. Choose an output style, and list any tags you want to keep.
  4. Click Copy or Download .txt.

Output styles

StyleWhat you getBest for
Readable textBlank lines between paragraphs and headings, one line per list item with a bullet or number, tabs between table cellsCopying content from a web page, an email, or a CMS into a document
Strip tags onlyTags removed, with every space and line break left exactly as it was in the sourceCode, templates, and anything where the original spacing matters
Single lineAll the text on one line with single spacesMeta descriptions, spreadsheet cells, search indexes, and word counts

What gets removed

  • Tags and comments: every tag, including ones with > inside quoted attributes, and every <!-- comment -->.
  • Scripts and styles: the code inside <script>, <style>, <head>, <template>, and <svg> is removed along with the tags, so no JavaScript or CSS ends up in your text.
  • Hidden content: elements with the hidden attribute or an inline display:none, like the preview text in email newsletters, are skipped unless you turn that off.

Your HTML is read as text, never loaded as a page, so scripts can't run and images and trackers aren't fetched.

Keeping some tags

Type tag names in Keep these tags, separated by commas, and those tags stay exactly as written, attributes included, while everything else is removed. For example, b, i, a, p keeps basic formatting and links. This works like PHP's strip_tags() with allowed tags. When you keep tags, the output is still HTML, so entities such as &amp; are left alone to keep it valid. Keep in mind that keeping a tag also keeps any attributes on it, such as onclick, so don't use this to make untrusted HTML safe. Use a sanitizer library like DOMPurify for that.

Removing HTML tags with code

In the browser, new DOMParser().parseFromString(html, 'text/html').body.textContent returns the text without running scripts, but it keeps the source's line breaks and includes text from script and style tags. In Python, BeautifulSoup's get_text(separator='\n', strip=True) is the usual choice. In PHP, strip_tags($html) removes tags and leaves entities encoded, so follow it with html_entity_decode(). A regular expression like /<[^>]*>/g is fine for quick jobs, but it breaks on comments, scripts, and attributes that contain >.

Frequently asked questions

Does it keep paragraphs and line breaks?

Yes, in Readable text. Paragraphs, headings, and other blocks are separated by a blank line, br tags become line breaks, and text inside pre tags keeps its spacing.

What happens to links and images?

By default, links become their text and images are removed. Turn on Show link URLs to add each URL in parentheses after its link text, and Image alt text to keep the description of each image.

Does it decode entities like &amp; and &nbsp;?

Yes. Named and numeric entities are turned back into the characters they stand for, and non-breaking spaces become regular spaces. You can turn either off.

Can I keep some tags and remove the rest?

Yes. List them in Keep these tags, like b, i, a. Those tags stay exactly as written and every other tag is removed.

My HTML shows up as &lt;p&gt;. What do I do?

That's escaped HTML. The tool notices it and offers to decode it first, or you can turn on Input is escaped yourself.

Is it safe to paste HTML from an unknown source?

Yes. The HTML is treated as text and never rendered, so scripts don't run and images aren't loaded. Nothing is uploaded to a server.

Can it handle a full web page or a large file?

Yes. Paste a whole page source or open a saved .html file. Pages of several megabytes are cleaned in well under a second on most devices.

Our Full Dev Tool Library

Flipper File