My Tool Studio
Text

Strip HTML Tags

Paste markup into this tool to strip HTML tags and get clean plain text back. It keeps the structure you can see on a page: headings, paragraphs and list items land on their own lines, and line breaks from br tags stay put. Script, style and comments are removed completely, and entities like & and   become normal characters. Options add - or 1. before list items, keep link addresses, show image alt text, remove blank lines, or keep chosen tags such as b, i and a with unsafe attributes stripped. Open an .html file or load a public page, then copy or download the text. People use it to turn an HTML newsletter into plain text or clean a CMS export. The parsing runs in your browser.

Always freeNo sign upRuns in your browser

How to use

01

Paste your HTML

Paste markup into the HTML box, press Open .html, or drop a file on the box. Try sample loads a short newsletter with a style block, a list, an image, a link and a script.

02

Choose the options

Keep line breaks is on by default. Tick options to add list bullets, keep link URLs, show image alt text or remove blank lines. Type tag names in Keep these tags to leave, say, bold and links in place.

03

Copy the plain text

The Plain text pane updates as you type or change an option. Click Copy above it or Download .txt below, then press Clear for the next piece of HTML.

Why Strip HTML Tags

Example: an HTML newsletter turned into plain text

The Try sample button loads a short marketing email with a style block, a greeting with a line break, a bulleted list, a link and a tracking script. With Keep line breaks on and Keep link URLs ticked, the output reads:

Spring sale / Hi Priya, / Our spring sale starts today & runs all week. / 20% off shoes / Free delivery over ₹999 / See the offers (https://example.com/sale)

Each slash above marks a new line in the real output, and the heading, greeting, list and link are separated by blank lines. The CSS and the trackOpen() script are gone, & has become &, and ₹ has become the rupee sign. Untick Keep line breaks and the same email comes out as one long line, which suits a spreadsheet cell or a plain text preview field.

What happens to each part of the page

These rules decide what survives when tags are stripped. They follow the way a browser lays out a page, so the plain text keeps the same reading order and grouping you would see on screen.

  • Text: kept. Runs of spaces and line breaks inside the HTML source collapse to a single space, as in a browser.
  • Headings, paragraphs, lists, tables, blockquotes: start on a new line with a blank line around them.
  • List items, divs, table rows and br tags: start a new line without a blank line.
  • Pre blocks: with Keep line breaks on, spacing and line breaks inside them are kept as written.
  • Script, style, noscript, template, iframe, svg and head: removed along with everything inside them.
  • Comments: removed. Images: removed, or shown as [Image: alt text] when that option is ticked.
  • List items: can start with - or, inside a numbered list, 1., 2. and so on.
  • Entities: decoded to the real character unless you untick Decode entities.

Common questions

How do I remove HTML tags but keep line breaks?
Leave Keep line breaks ticked. Headings, paragraphs and other blocks are separated by a blank line, while list items, table rows, divs and br tags start a new line. Untick the option if you want everything joined into a single line of text.
How do I convert HTML to plain text?
Paste the HTML into the Input pane and copy the result from the Plain text pane. The browser parses your markup the same way it would render a page, then the tool walks through it and keeps only the text. Nothing is sent to a server.
Does stripping HTML also remove JavaScript and CSS code?
Yes. Everything inside script, style, noscript, template, iframe, svg and the page head is dropped, not just the tags around it. Inline style attributes and event handlers disappear along with their tags.
Does the HTML stripper decode entities like & and  ?
Yes, by default. &amp; becomes an ampersand, &nbsp; becomes a normal space and numeric entities such as &#169; become the character they stand for. Untick Decode entities if the text is going back into HTML and you need &, < and > written as entities.
Can I keep the link URLs when stripping HTML tags?
Yes. Tick Keep link URLs and each link is written as its text followed by the address in brackets, for example See the offers (https://example.com/sale). Links that only point to a spot on the same page, starting with #, are left as plain text.
Is it safe to paste HTML from an email into this tool?
Yes. The HTML is parsed into an inert document, so scripts never run and images and tracking pixels are never loaded. The work happens in your browser tab and nothing is uploaded or stored.
What happens to images and tables when I strip HTML?
Images are removed. Tick Show image alt text to keep their description as [Image: alt text]. Table cells are separated by tabs and each row goes on its own line, so a pasted table usually drops neatly into a spreadsheet.
How do I strip HTML tags in Excel or Google Sheets?
In Google Sheets, =REGEXREPLACE(A1, "<[^>]*>", "") removes tags from a cell. In Excel, Find and Replace with <*> in the Find box and nothing in Replace works for simple markup. Neither approach decodes entities or drops script and style code, which this tool does.
Will the tag stripper cope with broken or unclosed HTML?
Yes. The browser's parser repairs unclosed tags and stray closing tags the same way it does for real web pages, so you still get the text. Very broken markup can put line breaks in slightly different places.
Can I strip HTML but keep some tags like bold and links?
Yes. Type the tag names in Keep these tags, for example b, strong, i, a, p. Those tags stay in the output as clean HTML, while every other tag is removed. Kept tags lose class, style and event attributes. Links keep only href and title, images keep src and alt, and script, style and iframe can never be kept.

More Text tools

View all