Strip HTML tags and keep the plain text
Paste HTML code: tags, comments, scripts and styles disappear, entities are decoded and the text keeps its paragraphs and bullet lists. Free, and the code never leaves your browser.
Free, no sign-up, no limit Runs in your browser: your text and files are never sent or saved.
Strip HTML tags
How to use it
- Paste the HTML: a page source, an e-mail template, a CMS export or a snippet.
- Keep the line breaks for paragraphs and lists, add links as “text (URL)” if you need them, and choose whether to collapse spaces.
- Copy the plain text or download it as a .txt file.
Example
Input
<h1>Weekly news</h1> <p>Hello & welcome!<br>Read <a href="https://example.com/news">our latest post</a>.</p> <ul><li>Tips</li><li>Events</li></ul>
Output
Weekly news Hello & welcome! Read our latest post. - Tips - Events
Good to know
- The HTML is read as text: it is never displayed or run in this page, so scripts inside it cannot execute.
- Common named entities ( , &, é, ’, €…) and every numeric entity (é, é) are decoded. Rare named entities stay as they are.
- Images, videos and form fields disappear; tick the image option to keep their alt text as “[text]”. Numbered lists (<ol>) keep their numbers. A lone “<” as in “3 < 5” is kept as text.
- “Collapse spaces” also turns no-break spaces into ordinary ones. Table cells are separated by a space and rows by a line break.
- Badly broken HTML, such as a tag with an unclosed quote, can leave bits of code behind: check the result.
Frequently asked questions
How do I remove HTML tags from text?
Paste the HTML in the box: every tag, comment, script and style block is removed, entities like & or become normal characters, and paragraphs and list items keep their line breaks. Copy the clean text or download it as a .txt file.
How do I strip HTML tags from a string in JavaScript or Python?
In a browser, new DOMParser().parseFromString(html, "text/html").body.textContent returns the text without running scripts. In Python, BeautifulSoup(html, "html.parser").get_text() does the same, and PHP has strip_tags(). A regex such as /<[^>]*>/g is fragile: it breaks on “3 < 5” and leaves entities undecoded.
How do I remove HTML tags from an Excel cell?
Select the cells, press Ctrl+H, type <*> in “Find what”, leave “Replace with” empty and click Replace All: the * wildcard removes every tag. Entities such as & stay, though. For long HTML, paste it here, which also decodes entities and keeps the line breaks.
Can I keep the links?
Yes. Tick the links option and each link is written as “text (URL)”, so “our latest post” becomes “our latest post (https://example.com/news)”. Without it, only the link text is kept.
Is it safe to paste HTML with scripts?
Yes. The HTML is read as plain text and is never displayed or executed in this page, so a script inside it cannot run. Script and style blocks are removed together with their content.