Remove HTML Tags from TextHTML to Plain Text or Markdown

Paste HTML code or text copied from a web page and get plain text back. Keep line breaks and link URLs, turn tables into tab-separated text, convert to Markdown, or keep only the tags you list.

Your input is never sent anywhere.

Details
0 chars / 0 tags

Extraction options

Output format

Removes every tag and returns plain text.

Table cell separator

Result
Characters 0
Lines 0
Reduced 0%
Enter HTML above and the extracted text appears here

What stripping HTML tags leaves behind

The tool removes the tags from HTML code, such as <div> and <p>, and returns the text a reader would see. It can also drop the contents of <script> and <style> elements, so code does not end up in your text.

Stripping the tags does not have to flatten the page. You can keep line breaks, paragraphs, and list bullets, write links as text followed by the URL, and include image alt text. Tables can become tab-separated text for Excel, and the whole page can become Markdown.

If you only want to remove some tags, choose Keep selected tags and list the ones to keep. The result updates as you type, so there is no button to press.

Common jobs for extracted text

Plain text from a copied web page

Pasting a web page into Word or an email can bring formatting along. Paste it into the HTML Source box and copy back text with only the paragraphs and line breaks.

A table for Excel or Google Sheets

Convert a table element to tab-separated text. Paste it into a spreadsheet and the cells land in the same rows and columns.

Markdown for AI tools or a blog move

The Markdown format keeps headings, lists, links, and tables while dropping the rest of the markup, which also shortens the text you send.

The text version of an HTML email

Turn on Keep link URLs so the plain-text copy still shows where each link goes.

How to extract text from HTML in 4 steps

  1. Paste HTML code, or text copied from a web page, into the HTML Source box. You can also click File or drop an .html file on the box.
  2. Choose an Output format: Text, Markdown, or Keep selected tags.
  3. Adjust the options, such as line breaks, link URLs, and how tables are separated.
  4. Check the Result, then click Copy result or Save.

Note: There is no run button. The result updates as you type and every time you change an option.

Output details worth knowing

  • What is read: only the body of the page is converted. Text in the head, such as the title, is not included, and neither are comments or the contents of input, textarea, and select elements.
  • Scripts and styles: turn on Remove script and style contents when you paste the source of a whole page. It also removes iframe, SVG, canvas, noscript, template, object, and embed elements.
  • Line breaks: with Keep line breaks on, paragraphs, headings, list items, table rows, and br elements start new lines. Turn it off to put all the text on one line. It applies to the Text format only, since Markdown always keeps its line breaks.
  • Spaces: &nbsp; is decoded to a non-breaking space. Merge repeated spaces turns those into regular spaces and merges repeats.
  • Keep selected tags: the output is HTML, so characters such as & are written as entities. If you do not keep table, tr, th, and td, the cells of a table run together. Use the Tables preset to keep them.

How each HTML element is converted

What the Text format does with the common elements. The Markdown format differs where noted.

ElementResultTypical use
Standard tags (<p>, <div>)Tags are removed and the text is kept. Paragraphs and block elements start new lines.Extracting article text
Links (<a href>)Link text only. With Keep link URLs, “text (URL)”. Markdown always writes [text](URL).Plain-text emails, source lists
Entities (&amp;, &nbsp;)Decoded to the characters they stand for.Clean, readable text
Line breaks (<br>, <hr>)A new line. With Keep line breaks off, everything joins on one line. Markdown turns <hr> into ---.Keeping the text readable
Script and styleThe tags and the code inside are removed when Remove script and style contents is on.Text without code noise
Images (<img alt>)With Include image alt text, [Image: alt text]. Markdown writes ![alt](src).Listing image descriptions
Lists (<ul>, <ol>, <li>)One item per line with • or 1. in front. Nested lists are indented. Markdown uses - and 1.Reusing bulleted lists
Tables (<table>, <tr>, <td>)Tab-separated, space-separated, or a Markdown table.Pasting into Excel or Google Sheets
Preformatted text (<pre>)Spaces and line breaks are kept. Markdown writes a fenced code block.Code samples
Comments (<!-- -->)Removed.Cleaning up source code

Why pasted web text carries extra markup
Text copied from a web page often comes with hidden markup, such as class and style attributes. The Text format removes all of it. Keep selected tags keeps only the tags you list, so you can move content into a CMS without the original page's styling.

Why the tool uses a parser
A find-and-replace on angle brackets cannot tell a paragraph from an inline tag. The tool reads the page with the browser's HTML parser, so it knows which elements start a new line and which ones to skip.

Your code stays in your browser
The tool runs as JavaScript on the page and has no upload step, so unpublished HTML and internal documents are not sent to a server.

Choosing settings for Word, Excel, AI tools, and a CMS

The best output format depends on where the text is going. Here is a starting point for each.

Word, email, and Notepad: Text with line breaks kept

To paste without formatting, use the Text format with Keep line breaks and Blank line between paragraphs on.
Trim spaces at line start and end is on by default, so you do not have to tidy each line after pasting.

Excel and Google Sheets: tab-separated tables

Set Table cell separator to Tab-separated (for Excel). Cells are separated by tabs and rows by line breaks.
Line breaks inside a cell are turned into spaces, so each table row stays on one line and lands in one spreadsheet row.

AI tools and a CMS: Markdown or Keep selected tags

Choose Markdown to keep headings, lists, links, and tables in a compact form. Choose Keep selected tags if you need HTML.
With Remove class, style, and other attributes on, the tags you keep carry no styling from the original page, so they take on the look of the site you move them to.

Common problems when stripping HTML

Script and style code shows up in the text

You paste the source of a whole page and strip the tags. The JavaScript and CSS inside script and style elements stay as text and bury the content you wanted.

💡 See the solution▼
Turn on Remove script and style contents. It deletes those elements together with the code inside them, so only the page text is left.

Everything ends up on one long line

A simple find-and-replace for tags ignores which elements start a new line, so paragraphs, list items, and table rows run together.

💡 See the solution▼
Turn on Keep line breaks. Paragraphs, headings, list items, table rows, and br elements each start a new line, so the structure of the text stays readable.

Table cells run together

Removing the table tags joins the cell contents, so a row such as Sneaker A and $88.00 becomes Sneaker A$88.00, and a spreadsheet puts it all in one cell.

💡 See the solution▼
Use the Text format and set Table cell separator to Tab-separated (for Excel). If you use Keep selected tags, include table, tr, th, and td in the list, or use the Tables preset.

Link addresses disappear

Stripping the tags from a newsletter or a draft leaves only link text such as Learn more, and the addresses are lost.

💡 See the solution▼
Turn on Keep link URLs to get Learn more (https://...). If you want to keep the structure as well, choose Markdown, which writes links as [text](URL).

HTML tag remover FAQ

Q.Is my HTML or text sent to a server?

Q.

A. No. The tool reads and converts your HTML with JavaScript in your browser, and the page has no upload step. The code you paste, the text it produces, and any file you open stay on your device. Your text is held only in the page while it is open, and closing or reloading the page clears it.

Q.Can I keep the link URLs after the tags are removed?

Q.

A. Yes. In the Text format, turn on Keep link URLs and each link is written as link text followed by the address in parentheses. In the Markdown format, links are always written as [text](URL). Links with an empty address, an anchor that starts with #, or a javascript: address are left as plain text.

Q.How do I turn an HTML table into something I can paste into Excel or Google Sheets?

Q.

A. In the Text format, set Table cell separator to Tab-separated (for Excel). Cells are separated by tabs and rows by line breaks, and line breaks inside a cell become spaces. Copy the result and paste it into Excel or Google Sheets, and each cell goes into its own column. Space-separated joins the non-empty cells of a row with a space instead, and the Markdown format outputs a Markdown table.

Q.Can I remove every tag except the ones I choose?

Q.

A. Yes. Choose Keep selected tags and type the tag names to keep, separated by commas or spaces, for example p, br, a, strong. All other tags are removed and their text stays. With Remove class, style, and other attributes on, the kept tags lose every attribute except href, src, alt, colspan, and rowspan. The output is HTML, so check it in your editor or on the page.

Q.Can I convert HTML to Markdown for ChatGPT or another AI tool?

Q.

A. Yes. Choose the Markdown format. Headings become #, lists become -, bold becomes **, italic becomes *, links become [text](URL), and tables become Markdown tables. Code and quotes are converted as well. Removing the tags also cuts the number of characters you send, and the Reduced badge shows by how much. Turn on Include image alt text if you want images written as Markdown images.

Q.How do I strip the formatting from text I copied on a web page?

Q.

A. Copy the text on the page, click into the HTML Source box, and paste. With Paste copied web content as HTML on, which is the default, the tool uses the HTML your browser put on the clipboard and extracts the plain text from it, keeping paragraphs and line breaks. Turn the option off if you want the box to receive only the plain text your browser provides.

Q.Does it work with broken HTML that has missing closing tags?

Q.

A. Yes, in most cases. The tool uses the browser's own HTML parser rather than a find-and-replace on angle brackets. Like a browser, the parser fills in missing closing tags and fixes nesting, and then the tool reads the text. For badly broken markup the line breaks may not fall where you expect, so check the result.

Q.What happens to entities such as &amp; and &nbsp;?

Q.

A. In the Text and Markdown formats they are decoded: &amp; becomes &, &lt; becomes <, and &nbsp; becomes a non-breaking space. With Merge repeated spaces on, those non-breaking spaces become regular spaces and repeated spaces are merged into one. With it off, they stay as non-breaking spaces. In the Keep selected tags format the output is HTML, so characters such as & are written as entities again.

Q.Can I open an HTML file instead of pasting code?

Q.

A. Yes. Click File, or drop a file onto the HTML Source box. The tool reads .html, .htm, .xhtml, .xml, .txt, and .md files up to 5 MB. When you are done, Save downloads the result as a .txt file, or as .md or .html in the Markdown and Keep selected tags formats.

User Feedback & Request

Your feedback
makes this tool better.

Tell us which features you'd like, what should be fixed, or which new tool you'd like to see. An engineer reads every submission and uses it to guide development.

Send feedback