Ready, runs in your browser
0 chars · 0 words
uploaded, it runs locally
0 bytes
strip, then tidy
2 passes
on input length
No limit

The job

What the strip HTML step does in a cleanup

Markup in, text out. Script and style blocks are removed whole, contents included. Every other tag is deleted and the text between the tags is kept. The transform runs in your browser, so nothing is uploaded and there is no allowance to spend.

Treat it as the first pass rather than the only one. A tag strip is deliberately simple, and simple transforms leave predictable residue. The rest of this page is about what that residue is and what to do with it, because knowing the failure modes in advance turns a two-minute fix into a five-second one.

The run

How to strip HTML tags in three steps

No options to set. The decisions all happen after the output appears.

Step 1
Paste the markup. Full documents, CMS fragments and email source all go through the same path, and there is no length ceiling.
Step 2
Press Strip HTML. The pass runs locally and the plain text appears immediately.
Step 3
Scan the output for the two known residues: sentences that ran together where a block element ended, and entities that came through as text.

What to fix afterwards

The residue a strip HTML pass leaves

Four things to look for, in the order they are likely to bite. None of them is a malfunction, all of them are consequences of how the transform works, and each one takes seconds once you know it is coming.

Joined paragraphs
Tags are deleted, not replaced with newlines. Minified markup comes out as one long line, while source with newlines between its tags keeps them.
Undecoded entities
Four are decoded: the non-breaking space, the ampersand, less-than and greater-than. A copyright, a euro or any numeric entity arrives as literal text.
Escaped tags as content
Decoding happens after stripping, so an escaped tag becomes visible angle brackets in the output rather than disappearing.
Title text
Head content is not special-cased, so the text of a title element lands at the top of your plain text and needs deleting by hand.

The big one

Why stripping HTML joins your paragraphs together

This is the one that catches people, and it decides whether you need a second pass. Nothing is inserted where a block element ended. Paste two paragraphs written on one line with no whitespace between the tags and the two sentences arrive welded together.

Whitespace outside tags is left completely alone, which is the saving grace. Markup copied from a file, a view-source panel or a formatted export already carries newlines between its tags and those newlines survive the pass intact. Minified HTML, a database field, or markup pasted out of a single-line log does not. Check which kind you have before you paste, because the fix differs entirely: formatted source needs nothing, minified source needs the paragraph breaks put back by hand.

The second pass

Dealing with the entities a strip HTML pass leaves behind

Four entities are handled here. A competing tool advertises more than twenty named and numeric entities, and another decodes none at all and refers you to a separate decoder. Ours sits between those positions and the page names the four rather than leaving you to discover the gap.

So build the workflow around it. If your source came from a CMS that escapes aggressively, expect a second pass with a dedicated entity decoder after this one. If it came from a hand-written page or an editor export, the four handled here usually cover everything that actually appears.

Asked directly

Can stripping HTML be used to sanitise input?

No, and this is the one place where using the wrong tool has real consequences. A competing tool on this term frames the job around users injecting markup into comment fields. That is a genuine concern and a regex tag strip is not the answer to it.

Deleting everything between angle brackets is not the same as parsing markup, and malformed input is exactly where a regex and a parser disagree. Sanitising belongs inside your application, with a real parser and an explicit allow-list. This transform belongs in a content workflow, where the job is reading a document rather than defending one.

Order of operations

Where the strip HTML step goes in a pipeline

Early. Strip the markup first, because every later cleanup gets easier once there are no tags in the way. A word count run over raw HTML counts the tags. A hidden-character check run over raw HTML has to wade through attributes.

After stripping, the usual next moves are a whitespace pass if the source was minified, an entity decoder if the source was heavily escaped, and a hidden-character check if the text passed through a chat window at any point. Each of those is its own route on this site and each one is local, so the whole chain runs without anything leaving your browser.

In practice

Who strips HTML tags, and on what

Content teams migrating between systems, where an export arrived as markup and the destination wants text. Writers pulling copy out of a CMS field. People moving an HTML newsletter into a document, where every tag is noise.

Developers use it as a fast way to see what a page actually says, which is what the script and style removal exists for. And it is the standard first step before any other text cleanup, because everything downstream is simpler once the angle brackets are gone.

FAQ

Everything answered. Working with stripped HTML

How do I strip HTML tags from a document?

Paste the markup and run the pass. Tags are removed and the text between them is kept.

Is it free?

Yes, with no account and no daily allowance.

Is my markup uploaded?

No. The transform runs in your browser and the input never leaves the device.

Is there a size limit?

No. Because it runs locally there is nothing to cap, unlike server-side tools that publish a character ceiling.

Does it remove script and style code?

Yes, both are removed with their contents so neither JavaScript nor CSS reaches the output.

Why did my paragraphs run together?

Tags are deleted rather than converted to newlines. If the source had no whitespace between its tags, there is nothing left between the sentences.

Can I turn on a keep line breaks option?

There is no such option on this route. Two competing tools offer one, and this page states the actual behaviour instead.

Which entities are decoded?

Four: the non-breaking space, which becomes a normal space, plus the ampersand, less-than and greater-than entities.

Why is my euro or copyright entity still there?

It is outside the four handled here. Run a dedicated entity decoder as a second pass.

Why do escaped tags appear as visible text?

Entities are decoded after tags are stripped, so an escaped tag is decoded into angle brackets rather than removed.

Does it delete comments?

Ordinary comments go with everything else in angle brackets. A comment containing a greater-than sign can leave a fragment.

Does the page title end up in my text?

Yes. Head content is not treated specially, so title text appears in the output and needs deleting by hand.

Does it handle malformed HTML?

Usually, but this is regex matching rather than a full parser, so unclosed or deeply nested markup can produce odd results.

Can I use it to sanitise user input?

No. Sanitising belongs in your application with a real parser and an allow-list.

Are links preserved?

No. Anchor tags go like any other, taking the href with them and leaving the link text.

Can it output Markdown?

No. The output is plain text with no formatting.

What should I run after it?

A whitespace pass if the source was minified, an entity decoder if it was heavily escaped, and a hidden-character check if it passed through a chat window.

Can I upload a file?

No. Paste the markup as text.

Does it work offline?

Once the page has loaded, the transform itself needs no network, because it runs in the browser.

How is this different from the markdown stripper?

This removes HTML tags. The markdown stripper removes markdown syntax like hashes, asterisks and link brackets.