GALAXY OF TOOLS

TEXT SECTOR

HTML Tag Remover

Strip HTML tags and get clean, readable text — line breaks, lists, tables and link addresses kept the way you want.

.html, .htm, .xml, .txt — the file is read on your device

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

Remove HTML tags and keep clean, readable text

This HTML tag remover turns HTML code into plain text you can paste anywhere — an email, a spreadsheet, a chat or a document. Instead of blindly deleting everything between angle brackets, it reads the HTML with your browser’s own parser, so paragraphs become paragraphs, <br> becomes a line break, list items get bullets or numbers, table cells are separated by tabs and character references such as &amp;, &nbsp; and &#8377; turn back into &, a space and ₹.

You decide what survives: keep each link’s address after its text, show image alt text, leave entities exactly as written, or switch to “Keep chosen tags” to strip everything except a short list such as <p>, <b> and <a> — handy for cleaning HTML pasted from Word or another website before it goes into a CMS.

Safety is built in. The code is parsed into an inert document that never runs scripts, never fires event handlers and never loads images or frames, and nothing is uploaded.

How to use the HTML Tag Remover

  1. Paste HTML into “HTML code”, or press “Open a file” to load an .html, .htm or .xml file.
  2. Keep “Plain text” selected to remove every tag. The result appears immediately.
  3. Adjust the options: line breaks for block elements, link addresses, entity decoding, script and style content, list bullets, image alt text and non-breaking spaces.
  4. To keep some formatting, choose “Keep chosen tags” and list the tags to keep, separated by commas.
  5. Copy the result, or download it as a .txt file (or .html in “Keep chosen tags” mode).

HTML Tag Remover features

Real HTML parsing

Uses the browser’s HTML parser, so broken markup, comments, > inside attributes and unclosed tags are handled the way a browser handles them.

Structure kept as text

Headings and paragraphs are separated by blank lines, lists get • or 1. 2. 3. (respecting start numbers and nesting) and tables become tab-separated rows.

Scripts never run

Content inside <script>, <style>, <iframe> and <svg> is dropped, and the pasted page cannot execute code or make network requests.

Links and images your way

Append each link’s address in brackets, skip addresses that repeat the link text, and optionally keep image alt text.

Allow-list mode

Keep only the tags you name; attributes are limited to safe ones such as href and alt, and javascript: links and onclick-style handlers are always removed.

How each part of the HTML is converted

HTMLPlain-text result
<p>, <h1>–<h6>, <blockquote>Separate paragraphs with a blank line between them
<br>, <div>, <li>, <tr>A new line
<ul><li> / <ol start="3"><li>“• item” / “3. item”, nested lists indented by two spaces
<td>, <th>Cells separated by a tab, so the text pastes into a spreadsheet as columns
<a href="https://…">text</a>“text (https://…)”, or just “text”
<pre>Spaces and line breaks kept exactly
<script>, <style>, <head>, commentsRemoved

Why not just delete everything between &lt; and &gt;?

A find-and-replace pattern such as <[^>]*> is the usual quick fix, and it fails in predictable ways: a “>” inside an attribute ends the match early, the code inside <script> and <style> is left behind as text, entities like &amp; stay encoded, and every paragraph runs into the next because block boundaries simply disappear. Parsing the HTML first avoids all of that.

Pasting untrusted HTML into a page is normally risky. Here it is read with DOMParser, which builds a document that is never displayed: scripts are not executed, event handlers do not fire and images, frames and stylesheets are not fetched. The allow-list mode is a convenient clean-up, not a security sanitiser for a public website — if your site accepts HTML from users, sanitise it on the server with a maintained library too.

Related clean-ups

HTML Tag Remover FAQ

How do I remove HTML tags from text?

Paste the HTML into the HTML tag remover with “Plain text” selected. Every tag is removed straight away and the text keeps its paragraphs, line breaks and lists. Press “Copy result” to use it.

Will scripts in the HTML run when I paste it?

No. The HTML is parsed into an inert document that is never shown, so scripts do not execute, event handlers do not fire and images or frames are not loaded. Script and style content is also removed from the output by default.

Can I keep the links when stripping HTML?

Yes. “Keep link addresses” writes each link as “text (https://…)”. The address is skipped when it is the same as the link text, as with most email links.

How do I keep only some tags, like bold and links?

Choose “Keep chosen tags” and list them, for example “p, b, a”. Other tags are unwrapped so their text stays. Event handlers, style attributes and javascript: links are always removed, and script, style and iframe tags are never kept.

Why do &amp;nbsp; and &amp;amp; appear in my result?

They appear only when “Decode entities” is unticked, which leaves entities exactly as written. Tick it and &amp; becomes & while &nbsp; becomes a space.

Is the HTML uploaded anywhere?

No. The HTML tag remover works entirely in your browser; your code never leaves your device.

You might also need