zubrag.com
Free php and cpanel scripts to automate your daily routine

Online Tools :: Strip HTML Tags

HTML Tags Stripper is designed to strip HTML tags from the text. It will also strip embedded JavaScript code, style information (style sheets), as well as code inside php/asp tags (<?php ?> <%php ?> <% %>). It will also replace sequence of new line characters (multiple) with only one. Allow tags feature is session sticky, i.e. it will remember allowed tags list, so you will have to type them only once.

You can either provide text in text area below, or enter URL of the web page. If URL provided then HTML Tags Stripper will visit web-page for its contents.

Known issues:
Tool is not yet working correctly with non-latin characters (cyrillic, etc.). Will be fixed soon.

Please enter HTML to strip tags from:

Or URL of the page:

Allow tags (will not remove them), example <p><br>




You might be interested in other online tools.

Comments

Snake
October 10, 2006
waw it's creat , how can I am download ?
Alex
January 17, 2007
Why don't you build one yourself snake. Just use PHP and use find / replace code.
Pat
January 20, 2007
no alex find replace will not work... we have to use strip_tag fucntion to remove all the html tag... the same is done in this tool... zubrag.com is doing a great work.
Alex
January 26, 2007
Of course you can do find / replace! There is no php function called strip_tag. The code probably loads the HTML formatted text and searches for <p> </p> and strips them, leaving the text between them. It would remove <img ...> tags including all the height & width which you would do with a search function: find instances of <img and remove this as far as the next instance of >.
Gaz
February 5, 2007
Alex, there is a php function caled strip_tags loot @ the manual!!
http://uk2.php.net/manual/en/function.strip-tags.php
Alex
February 12, 2007
Pat said - strip_atg - not strip_tags. Anyway - I shall do it my way, in my typical minimalist style of 3 lines of code
rollo
March 28, 2007
Good stuff. Any chance of modifying it to allow retention of "core" tags (eg <p>)?

Yes, we'll add unremovable tags feature this weekend
March 30, 2007
I'm working on a site and i want to print the current page title on the page not just in the title position how can i do that?
kl365
August 21, 2007
nice script but removes crlf from text files as well, not sure if its a bug or feature.
August 21, 2007
fantastic script.
August 28, 2007
is it available for download?
September 16, 2007
Very cool.

Works even on html+javascript+php. Love it :D:D:D:D
January 29, 2008
Very nice - it beats doing a ton of regex in Dreamweaver :-)

1 feature request: Can you have a check box that removes anything inside a p or br tag but leaves the tag it's self?

For example I want this:
<p class="a" style="padding:5px;">
Changed to this:
<p>
When I have selected that I want to retain the <p> tag and also checked this box.

Possible?

Thanks!
Matt M.
March 20, 2008
I have an excel document with 7000 fields that need to be stripped on html tags, any suggestions on how I can do this (find/replace is not an option-formulas to long) I can go field by field with this editor, but was hoping for something to knock it all out in one shot?
monzur0010 [anti-spam] yahoo.com
April 2, 2008
How can i get the Script??
briantw [anti-spam] briantw.com
April 4, 2008
Alex, you were proved wrong and you say, "anyway, I'll do it my way." Learn some humility and admit when you're wrong.
Pat
April 6, 2008
Thank you very much!
April 24, 2008
Double byte characters are corrupted.

Please try this.
http://honyaku.yahoofs.jp/url_result?ctw_=sT,eCR-JE,bF,hT,uaHR0cDovL3d3dzE1LmJpZy5vci5qcC9+dDk4OTA3L3N0cmlwdGFncy8=,qlang=ja|for=0|sp=-5|fs=100%|fb=0|fi=0|fc=FF0000|db=T|eid=CR-EJ,k5d1b27197cfee5060a070c53319d72d1,t20080425080604,
Paul
April 26, 2008
How can you get it to keep script tags?

Here is what I tried:
In the Allow Tags field, I typed the following:
<script><p><br><table><head><body><html>
<title><meta><br><link><tr><td><div>
<form><img><!DOCTYPE>

It removed the word !DOCTYPE and it removed all php and javascript code. Am I doing something wrong?
Paul
April 27, 2008
I want to remove all font tags. Unfortunately, this tool deletes script and comment tags. So first convert the script tags to an unusual string like <SSSS or SSSS>, and convert the comment tags to <HHHH and HHHH>. Then paste the text into the tool, and strip the unwanted (font) tags. Use the following keep tags string:
<SSSS><HHHH><a><input><p><br><table><head><body><html><title><meta><br><link><tr><td><div><form><img><!DOCTYPE>

After the font tags are stripped, re-convert the substituted strings back to their original state. The word !DOCTYPE will need to be re-typed.
Paul
April 27, 2008
The above post is what I came up with to answer my own question. Does anyone know a better way?

I want to remove only the font tags. Unfortunately, the tool removes script tags too - even if <script> is typed into the Allow Tags field.
April 30, 2008
It also removes carriage returns, making it not so useful for cleaning HTML tags from emails.

Add Comment

E-mail or Name: Not required. Email will be protected from spammers

Comment: Please do not post unrelated comments

Anti-spam: Please enter (d9a4c520) into the box