Free Grok strip HTML tool

Tags out, script and style contents out, your line breaks left alone.

Free Grok strip HTML tool. Removes tags and the contents of script and style blocks in your browser, with nothing uploaded and no length limit.

Paste your text to begin
0 chars / 0 words
uploaded, it runs in your browser
0 bytes
on how much markup you paste
No limit
decoded, the rest pass through
4 entities

The tool

What the Grok strip HTML tool does

Paste markup, press Strip HTML, and the tags come out while the text between them stays. A heading followed by a paragraph comes back as two lines of plain words with no angle brackets in them.

It runs in your browser. Nothing is uploaded, nothing is stored and there is no account. Press Try a sample to see it work on a short block of markup with a heading, a bold tag and a non-breaking space in it before you paste anything of your own.

There are no options. One button does one job, which is worth knowing because several competing strippers are built around a mode list and this one is not.

The difference

Script and style blocks go with their contents

This is the part that separates a usable stripper from a frustrating one. Removing a script tag is easy. Removing the JavaScript inside it is a separate rule, and not every tool has one.

A well-known stripper that publishes its implementation uses a single tag-matching pattern and states the consequence honestly: it removes the tags but not necessarily the text between them, so your output arrives with the JavaScript and the CSS still in it. Another tool offers content removal as an optional mode you have to select.

Here it is unconditional and it was tested. Paste text with a script block between two words and the output is the two words joined. The same applies to a style block: the rules inside it are gone, not left behind as a run of selectors and colours.

The steps

How to strip HTML from text in three steps

Three steps, and the last one is where you catch the cases a tag-matching rule cannot handle.

Step 1
Paste the markup into the left pane. There is no character limit, so a whole page source is fine where other tools cap you at twenty thousand characters.
Step 2
Press Strip HTML. The tool reports how many characters were removed or changed, which on a page of markup is usually most of them.
Step 3
Read the output for stray angle brackets. If a fragment like a quote mark or a closing comment marker survived, the source contained a greater-than sign inside an attribute or a comment, and that part needs a manual fix.

The detail

The four entities it decodes, and the ones it does not

Entity handling is where strippers differ most. One tool decodes twenty or more including numeric ones, another deletes entities entirely and sends you to a separate decoder, and a third leaves every one of them alone. This tool decodes exactly four.

  becomes a space
The non-breaking space turns into an ordinary space, which is usually what you want when the markup is going to become prose.
& becomes an ampersand
The most common entity in a URL query string, restored to the character it stands for.
< and > become angle brackets
Escaped markup in the source comes back as literal angle brackets in the output. That output is text, not markup, but it will look like a tag.
Everything else passes through
Tested: ", ', © and all numeric entities survive exactly as written. If you need those decoded, that is a separate job this tool does not do.

The behaviour

What happens to line breaks and spacing

Nothing. The whitespace already in your source is preserved exactly, blank lines included. Three blank lines between two paragraphs come out as three blank lines.

The flip side is that a break tag leaves nothing behind. Some strippers convert block-level tags into newlines, either always or behind a checkbox. This one does not, so a paragraph tag or a line break tag is simply deleted like any other tag.

The practical consequence is worth planning for. Markup written on a single minified line comes back as a single line of text, because there were no newlines in the source to preserve.

The honest answer

Does the strip HTML tool sanitize markup?

No, and you should not use it as one. A tag-matching rule is a text cleaning step, not a security control, and the stripper that publishes its implementation says the same thing about itself in plain language.

There is a specific reason it is the wrong tool for that job here. Because the escaped angle brackets are decoded after tags are removed, markup that arrived safely escaped comes back with real angle brackets around it. That is fine when the destination is a text file and wrong when the destination is a web page.

If your input is untrusted and the output is going anywhere that renders, use a real sanitizer. This tool is for getting readable words out of markup you already trust.

The limit

Where a regex tag strip goes wrong

Every stripper in this category matches tags by pattern rather than parsing the document, and every one that publishes its mechanism admits the same weakness. One names the case where a less-than and a greater-than sign used as comparison operators get read as a tag.

Ours fails in the matching family of cases, and we tested them. An attribute whose value contains a greater-than sign is cut at that sign, so part of the attribute survives into the output. An HTML comment containing a greater-than sign leaves its tail behind.

These are uncommon in hand-written markup and more common in machine-generated pages. That is the reason for step three: a quick read of the output catches them, and nothing else will.

The users

Who uses the Grok strip HTML tool, and when

People who have markup and want the words. A page source, a chunk of email HTML, the contents of a rich text field, an export from a content system that wrapped everything in tags.

Writers use it to get a draft back out of a formatted editor without the formatting. Developers use it on a database field that stored markup it should not have. Anyone checking word count on a page uses it, because a word counter fed raw markup counts the tags.

It is the wrong tool when you want structure kept. Headings, lists and links all become undifferentiated text here, and if the destination needs them, a Markdown conversion is the job rather than a tag strip.

FAQ

Questions about stripping HTML

Everything below is answered in full, nothing to click open.

How do I remove HTML tags from text?

Paste the markup, press Strip HTML, and copy the plain text result. Every tag is removed and the text between the tags stays.

Is this strip HTML tool free?

Yes, with no account, no sign-up and no usage cap.

Is my markup uploaded anywhere?

No. It runs in your browser, so nothing is sent anywhere and nothing is stored.

Does it remove JavaScript inside script tags?

Yes. Script blocks are removed with their contents, so the code inside does not survive into the output.

Does it remove CSS inside style tags?

Yes. Style blocks are removed with their contents in the same way as script blocks.

Does it decode HTML entities?

Four of them. The non-breaking space, ampersand, less-than and greater-than entities are decoded and everything else passes through as written.

Why is © still in my output?

Because it is outside the four entities this tool decodes. Numeric entities and the quote and apostrophe entities are unchanged too.

Does it keep my line breaks?

It keeps the ones that were in your source, including blank lines. It does not create new ones from paragraph or break tags.

Why did my break tags disappear without a newline?

Because a break tag is removed like any other tag. This tool does not convert block-level tags into line breaks.

Is there a length limit?

No limit is set by the tool. Some competing strippers cap input at twenty thousand characters; this one does not.

Can I use it to sanitize untrusted HTML?

No. A tag-matching rule is not a security control, and escaped markup in your source comes back with real angle brackets.

Are HTML comments removed?

Ordinary ones are. A comment containing a greater-than sign leaves a fragment behind, which is a limitation of pattern matching rather than a bug to work around.

Why did part of a tag survive?

Almost always because an attribute value contained a greater-than sign, which ends the match early. Fix that case by hand.

Does it handle malformed or unclosed tags?

Unclosed tags are removed like any others, but deeply nested or broken markup can produce surprising output. Read the result rather than trusting it.

Are there modes or options?

No. One button, one behaviour. There is no mode list and no configuration on this route.

Can it convert HTML to Markdown?

No. Headings, bold, links and lists all become plain text here. Markdown conversion is a different job.

Does it keep link URLs?

No. The anchor tag is removed and only the link text survives, so the address is lost.

Can I upload or download a file?

No. There is no file input and no download. Paste markup in and copy text out.

Does it work on a phone?

Yes. It is a paste-and-press field on a web page and needs nothing installed.

What does the number after a run mean?

How many characters were removed or changed. On a page of markup that is usually most of the input.

Does it matter which AI model produced the HTML?

No. The rules match markup, not authorship, and nothing here depends on where the HTML came from.

Tags out, contents of script and style out.

Paste markup, press once, copy the words. It runs in your browser, nothing is uploaded, and there is no cap on how much you paste.

Strip the HTML