Cookies This site keeps only what it needs to work. There is no analytics and no advertising on it today, and nothing here follows you to other sites. Read the privacy policy

Choose what to allow
+92 312 8299940Free Quote
EN – Language: English
Free, nothing uploaded

Strip HTML Tags
Keep the Text Behind Them

Paste your code here and have it stripped of all HTML. You will be left with only the actual content that was contained within the HTML tags. It is now ready for reading or copying. All steps take place in this same browser window so you may use the results right away.

  • FreePrice
  • Not neededAccount
  • Keep or dropLinks
  • NoneUploads

HTML Tag Stripper

Paste your markup — the words come back without the tags

Words
0
Characters
0
Tags removed
0

Ready. Paste your markup and the words appear beside it.

Your browser reads this markup here, in this tab. We upload nothing, store nothing and log nothing.
Add a link to this tool on your own site

Copy the code below and drop it into your page. It places a link to this free tool.

The short version

What Does an HTML Tag Stripper Do?

A tag stripper removes all tags from a section of HTML and returns only the text within that area. Tags are removed and content remains. For example, if you pass in a paragraph wrapped in a tag, it will be returned to you as just a single line of text.

The job is straightforward until you have to deal with those unusual situations. Script blocks, style blocks, and inline comments all contain info that is unwanted in the final output and each type of situation will need to be handled by a different rule.

This is an easy-to-use tool that will take your markup, strip away the tags and keep the text. It’s up to you how you want to handle links, images and line breaks – each option gives a different solution for a variety of tasks. Use this tool any time you want to strip out HTML tags from your text before sending it off to a new location.

Browsers have a built-in idea of what counts as text. MDN's reference for textContent describes it, and this page follows the same rule.

Jobs Where You Must Remove HTML Tags Before Pasting

All applications understand only plain text. Whether you use a Content Management System (CMS), a Spreadsheet, or a Search Engine, they will only accept raw words. When you paste HTML/CSS/JS (markup) into these types of applications, the application will display the raw code instead of rendering the content.

Diagram of HTML with tags, a script and entities removed, leaving clean plain text with the links kept as words
Tags out, plain text in.

Length of text rules apply to you as well. When counting the number of characters in a meta description, a tweet or a product listing, the addition of tags will increase your character count but not the meaning of the content. It is best to remove those tags before counting so that you can get an accurate character count.

HTML tag stripper with a snippet of markup on the left and the clean plain text on the right, both boxes highlighted
Markup in, clean text out.

Strip HTML Tags Without Losing the Layout

deciding what a tag meant is the hard part. A closing paragraph tag indicates a separation between paragraphs and a list item is used to create a bullet point. If we remove both from our code, all the sentences will be run on as though they were in a single large block of text.

HTML tag stripper with the link menu set to keep the web address after each link text, and the result highlighted
Keep the address beside each link.

This tool for removing html tags will keep the original structure of your document. When you enable the "Line Breaks" feature, the resulting document will read like the original because every block element will end on a separate line.

HTML tag stripper with line breaks and bullets ticked, so the list items come out as separate lines with dashes
Lists stay as lists.

The Difference Between Stripping and Escaping

Stripping removes all of your markup. Escaping will display your markup as text by replacing those pesky angle brackets with "safe" code. You may choose poorly and end up with a huge block of code, or you may find yourself with a web page containing tags that no one requested.

Video guide

The HTML Tag Stripper in Action

This brief video shows each step from start to finish. Choose your language below, and switch on captions if they help.

How it works

Remove HTML In Four Easy Steps

Your browser can read the HTML directly, and since there is no installation process, your text will be sent right away.

  • Paste your markup

    Drop the HTML into the box, even if it is messy. The stripper will read your HTML as you write it; the stripper never runs a line of HTML.

  • Pick your options

    Keep link text (or remove script and style blocks), then convert tags to line breaks.

  • Read the result

    Your code is accompanied by a plain text area which has both word and character counts, allowing you to easily work out how much text you are working with.

  • Copy or download

    Two buttons will either copy the content of the window, or save it as a file. Your markup never leaves the window you’re working in.

Why this one

An HTML Tag Remover That Reads the Markup

A standard find and replace command removes both the tags and the text in between. The parser can separate these elements.

  • Script and style dropped

    A script block holds code and a style block holds rules. Both leave the output, because neither is content.

  • Breaks you control

    To make it easy to read, use newlines to separate each block element, or to put everything into one line use only one paragraph.

  • Entities decoded

    The ampersand, angle bracket and quote will once again become actual characters. The text will now read as if it were the same as the original web page.

  • Counts while you work

    Words, letters and lines are next to the results and this is important if a field has a maximum number of characters.

  • Nothing leaves your tab

    Your markup never leaves this page. No request, no storage and no log, so it works offline too.

Good habits

Working With Text After You Strip HTML

These six habits keep the result useful once the tags are gone.

  • Save the original HTML first. So, keep your original HTML/CSS markup in place until you have verified that the content is presented properly.
  • Turn on line breaks for prose. Paragraphs merged into one block are hard to read. Keep the breaks unless a field forbids them.
  • Decode entities at the same time. Encoded characters look like code. Decoding them gives you the words a reader would actually see.
  • Watch what links become. Losing your address is a side effect of dropping anchors. When the destination is what counts, make sure you keep the link text with the URL.
  • Check the count afterwards. A tag-heavy block shrinks a lot. So confirm the number fits the field before you paste it in.
  • Never trust pasted markup. Do not let copied HTML carry unnecessary elements or tracking pixels into your own pages. Take these out before you put the HTML on your page.
Avoid these

Tag Stripping Mistakes

Each one costs you words, structure or both.

  • Regex that eats real text

    The carelessness of a pattern matching an angle bracket in prose can result in deleting an entire sentence. But a parser does not delete a sentence.

  • Entities left encoded

    The use of ampersands and quotes remains as codes, which means the text appears to be code (source) as opposed to a complete sentence.

  • Paragraph breaks lost

    The whole thing is in a single big chunk. Although the words remain, the meaning gets confusing.

Questions

HTML Tag Stripper FAQ

Is it safe to paste my markup here?

Yes. Your cleaning process occurs solely on your computer, so no info is transmitted through the Internet and nothing is saved. When you paste in code, it is processed as pure text and not executed; so any script embedded in the code will remain unexecuted.

Which tags does the tool remove?

All of them. Tags, the tags’ attributes, and the tags’ comments are removed from the final product. Script and Style sections (along with the content in those sections) are also removed since the code and rules in those sections do not contain any legible text.

Will the stripped text keep its paragraph gaps?

You choose. Turn on the line break option and each block element ends on a new line, so paragraphs, headings and list items stay apart. Leave it off and the whole result flattens into a single paragraph.

What happens to links?

Three switches, each a single click. Keep the visible link text and drop the address, keep both with the URL in brackets, or drop the link entirely. Keeping both suits research notes, while dropping suits plain prose.

Can the tool decode HTML entities?

Yes, and it remains enabled. Characters such as ampersand and angle bracket forms will be converted into their respective character values, making the text read exactly as it appeared when the page was displayed.

Does this replace a proper HTML parser?

Yes, for reading text. This tool goes through the markup, and pulls the words out, covering copy, spreadsheets and content fields. For rewriting the actual markup, use a true DOM parser instead.

More free tools

More Denwix Tools Worth Opening Next

Every Denwix tool listed here runs locally, with no login and nothing uploaded.

  • HTML Minifier

    Shrink your markup without breaking a single tag.

  • Word Counter

    Word, letter, sentence, and minute counts update with each key pressed.

  • Diff Checker

    Put two versions side by side and spot every edit between them.

Turn that markup into readable text

Paste your code, pick what to keep, and copy the words. Nothing travels anywhere and nothing sticks around.

Prefer Denwix on GoogleReview Denwix on Google