HTML Tags Remover
Paste HTML on the left to get plain text on the right. Nothing is uploaded: the text is cleaned in your browser.
ends. Off: the text goes on one line.
Remove HTML Tags from Text Online, Free
Paste HTML into the box on the left and get plain text on the right. The tool removes every tag, keeps your line breaks, throws away scripts, styles and comments, and turns entities such as & and into normal characters. The result updates as you type, and everything happens in your browser: the text you paste is never uploaded.
When you need to strip HTML tags
- Copying an article or a product description from a website or a CMS without the markup.
- Getting the text out of an email template or a newsletter source.
- Preparing text for a spreadsheet, a database field or a translation tool that does not understand HTML.
- Counting the words or characters of a page without counting the tags.
- Checking what a search engine or a screen reader actually gets as text.
What is removed and what is kept
- Removed: all tags and attributes, everything inside <script>, <style>, <noscript> and <template>, and HTML comments.
- Kept: the text between the tags. With "Keep line breaks" on, a new line starts wherever a block element (<p>, <div>, <li>, a heading, a table row) or a <br> ends, so paragraphs do not stick together. Table cells are separated by a space.
- Converted: entities such as &, <, © and numeric ones like — become the characters they stand for.
- Tidied (optional): "Collapse extra spaces and blank lines" turns runs of spaces and no-break spaces into one space, trims every line and removes empty lines. Turn it off to keep the spacing exactly as in the source.
Why not just a regular expression?
A pattern like <[^>]*> breaks on <a href="x>y">, leaves the code of a script behind and does not decode entities. This tool uses the browser's own HTML parser, the one that reads web pages, so the text you get is the text a visitor would read. The HTML is parsed in an inert document: scripts do not run and pictures do not load, so it is safe to paste code you do not trust.
How to use the HTML tags remover
- Paste your HTML into the left box. The plain text appears on the right straight away.
- Choose whether to keep line breaks and whether to collapse extra spaces and blank lines.
- Press the copy button above the result.
Remove HTML tags without this tool
- PHP:
strip_tags($html)removes tags, but keeps the code inside script and style, glues paragraphs together and leaves entities as they are. Wrap it ashtml_entity_decode(strip_tags($html))and cut script and style out first. - JavaScript:
new DOMParser().parseFromString(html, 'text/html').body.textContentreturns the text; remove the script and style nodes before reading it. - Python:
BeautifulSoup(html, 'html.parser').get_text('\n'). - Command line:
sed -e 's/<[^>]*>//g'works only for simple markup where every tag sits on one line. - Word or Google Docs: paste with Ctrl+Shift+V (paste without formatting). This drops the styles of copied text, it does not clean source code.
If you need the opposite, to make HTML smaller instead of removing it, use the HTML & CSS minifier. To turn special characters into entities and back, use the HTML entity converter.
Frequently asked questions
Is my text sent to a server? No. The conversion runs in your browser, so nothing you paste leaves your computer.
Does it remove the text between the tags too? No, only the tags. The exception is code that is not text: what sits inside script and style tags and in comments is dropped.
What happens to links and images? The text of a link stays, its address is removed. Images have no text, so they disappear.
Why did a part of my text vanish? HTML treats "<" followed directly by a letter as the start of a tag, so a<b is read as a tag called b. Write "a < b" with spaces, or "a < b" in HTML, to keep it as text.
Why did & turn into & ? The tool decodes entities the way a browser does. If your source has a double-encoded entity such as &amp;, you get & after one pass; run the result through again to decode it fully.
Is there a size limit? There is no limit in the tool. Very large pages (tens of megabytes) depend on the memory of your browser.
Popular tools
Check who hosts a website: the IP address, the hosting company (ASN), the country and the city of the server. Free hosting checker for any domain.
Free IP lookup: find the country, city, coordinates and timezone of an IP address and its host name with a reverse IP (reverse DNS) lookup. IPv4 and IPv6.
Free DNS lookup online: check A, AAAA, CNAME, MX, NS, TXT, SOA and CAA records of any domain, plus its SSL certificate. Find out why a DNS lookup fails.
Check from the United States (New York) whether a website is online: HTTP status code and response time in milliseconds. A free US ping test for any URL.