Sea Breeze Computers Logo

Cool HTML to BBCode Converter

v. 1.32

Last updated on
Subscribe to Internet Tips and Tools Feed
f Share
G+ Share
in Share
P in it

Paste HTML code in textbox and press the button and all the code that can be converted to BBCode will be displayed. HTML code that cannot be converted will be removed. You can also select the options below to convert to vB Code, SMF (Simple Machines Forum) Code, or IPB (Invision Power Board) Code.

BBCode vB Code SMF Code IPB Code


Copyright © 2006 by

BBCode is code used on message boards powered by software like phpBB. vB Code is code used on message boards powered by software like vBulletin. SMF Bulletin Board Code is used on forums powered by software such as SMF (Simple Machines Forum). IPB Code is used on forums powered by Invision Power Board.

If you are using a popular message board and would like to see its code incorporated into this converter then please email me at: Also if you are using some HTML tags and you think they should be converted to a specific bulletin board code tag let me know.

Also check out:
HTML to BBCODE Converter
HTML Tag and Attribute Stripper
Sea Breeze Computers Home Page

Known Issues and Bugs

This converter is a work in progress. It may have problems. If you find any bugs please let me know at:

6/13/06 - SMF Code - Converting insert of Flash video

When converting HTML flash video code into SMF flash video code the converter looks for HTML code that follows this pattern:

<object width="320" height="240">
<param name="movie" value="flash.swf">
<embed src="flash.swf" width="320" height="240">

The object tag and the param tag are for Netscape compatibility. The embed tag is for Internet Explorer. You should always use both methods when inserting a flash file into an HTML document. This converter uses the object tag and the param tag to convert into SMF code. The converter will just strip out the embed tag.

6/16/06 - <TEXTAREA></TEXTAREA> fix

Previously the code in a TEXTAREA was also converted to bbcode. But now the converter leaves the code in a TEXTAREA unchanged. So you can show people HTML, PHP, Javascript, etc. code in your message. The <TEXTAREA></TEXTAREA> tags are changed to [code][/code] or if you are using vB Code you can select an option to change them to [php][/php], [code][/code], or [html][/html] for proper syntax highlighting.

6/17/06 - SMF does not have ordered list support

I just found out that SMF does not have a tag for ordered lists. So now the HTML tag <OL> is converted to [list] instead of [list=1] when SMF Code is selected.

6/17/06 - SMF Code - Added <ABBR> and <ACRONYM>

Added a conversion for HTML tags <ABBR></ABBR> and <ACRONYM></ACRONYM> to SMF tags [acronym][/acronym].

6/18/06 - Netscape Fix

Cool HTML to BBCode Converter now works with Netscape 6.0 and above. It has not been tested with Netscape versions below 6.0.

6/18/06 - Added Copy to Clipboard Button

For Internet Explorer 4.0 and above there is now a button that copies all the converted code in the textbox to the clipboard for easy pasting. If you are using Firefox or Netscape a button for selecting all the text appears and then you can press CTRL-C to copy.

6/20/06 - Support for IPB Code

We have now added an option to convert IPB (Invision Power Board) BBCode. Along with that, if you select IPB Code, then you are given options to change <TEXTAREA></TEXTAREA> tags to [sql][/sql], [code][/code], or [html][/html] for proper syntax highlighting.

6/27/06 - Fixed <PRE> and <UL> bug

Fixed a bug where <PRE> was not being converted to [code] or [pre] depending on settings because the <P ...> conversion was replacing them with carriage returns. Also fixed a bug where <UL> was not being converted to [list].

6/27/06 - SMF Code - Added <TH> conversion

Cool HTML2BBCode Converter now converts <TH> and </TH> tags into [td] and [/td] tags if you have SMF Code selected.

6/27/06 - Added <SCRIPT></SCRIPT> conversion

<SCRIPT> tags are now converted the same way that <TEXTAREA> tags are converted, into [code][/code] tags. Or if you select vB code or IPB code there are other options.

6/27/06 - <TR><TD><TH> conversion

If you are not using SMF code then Cool HTML2BBCode Converter now converts <TR><TD> and <TH> tags into a carriage return, a space and a space, respectively. This is so that TABLEs look a little better when converted to bbcode. If you are using SMF code then they are converted into SMF tables.

9/1/06 - Fixed <IMG ALT= > Problem

Fixed problem where the ALT portion of an IMG tag messed up the conversion if it preceded the SRC parameter. Thanks rickdog.

10/9/06 - Bug Fix - Color and Size

If you had the word "color" or "size" in your text the converter would convert it to ][color or ][size. It should now only make those changes if they are part of a font statement. Thanks Bo.

10/27/06 - Bug Fix - Image in Anchor Tag

Previously if you put an image as the link for an anchor tag then the converter would think that the reference to the image was actually an image tag and it would append [/img] to the end of the tag. Ex: <A HREF="image.jpg">Click here to see image</A> was converted to [url=image.jpg[/img]]Click here to see image[/url]. This has been fixed. Now it is converted correctly to: [url=image.jpg]Click here to see image[/url].

10/28/06 - Major Bug Fix - Quotes and Single Quote

Previously if you used a single quote (') to surround your variables instead of double quotes (") then the converter would sometimes remove more code then it was supposed to because it was trying to remove the double quote variables first. This only happened with FONT FACE and when removing tag paramaters such as BORDER, STYLE, NAME, ID, TARGET, CLASSID, CLASS and ALT. This has been fixed. Please let me know if there are any other tag paramaters that should be removed.

1/9/08 - Now removing TITLE Tag paramater

Thank you to F. Martn for pointing out that this converter was not removing TITLE.

1/13/08 - <STRONG> tag converstion.

The converter now converts <STRONG> and </STRONG> to [b] and [/b] if you select bbcode or IPB code.

4/12/09 - SMF Code - PHP Tag

SMF Code has a [php] tag that color formats PHP syntax. So now when you select SMF Code you can select to convert TEXTAREA or SCRIPT tags to [code] or [php].

4/12/09 - IPB Code - Many new tags for IPB

I have added many new tags for IPB. These include a conversion of <HR> to [hr], <SUB></SUB> to [sub][/sub] and <SUP></SUP> to [sup][/sup]. Also you now have the option to convert <TEXTAREA></TEXTAREA> and <SCRIPT></SCRIPT> tags to [php][/php] or [xml][/xml] as well as [code][/code], [sql][/sql] or [html][/html] for proper syntax highlighting.

5/29/09 - Switched FONT closing Tag

Now <FONT face="arial" color="blue">blue</font> becomes [font=arial][color=blue]blue[/color][/font] instead of [font=arial][color=blue]blue[/font][/color]

7/20/09 - IPB Code - Converting insert of Flash video

When converting HTML flash video code into IPB flash video code the converter looks for HTML code that follows this pattern:

<object width="320" height="240">
<param name="movie" value="flash.swf">
<embed src="flash.swf" width="320" height="240">

12/31/09 - SMF Code - <STRONG> tag

Previously, the tag <STRONG> was converted to [glow] for simple machine forums. But now it is converted to [B][/B].

10/05/11 - ver 1.26 - rel and onclick attributes

rel and onclick attributes are now removed from HTML tags.

10/05/11 - ver 1.3 - Whitespace including newlines

The converter was not removing attributes such as onclick,rel,class,alt if they were on a new line. That has been fixed. For example, previously for the statement:

<a href=""
the onclick would not be removed because it was on a newline. Now it will be removed.

4/2/2012 - ver 1.31 - Removing ID and NAME and BORDER etc

Previously the converter was removing any id= border= or name= anywhere in the text. But now it has been changed to only remove those if there is whitepace in front of it. This helps for if there is a URL with id= or name= in it. Such as: <a href="test.php?id=1234">
Instead of removing the id=1234, it will now keep it. But it will still remove the id attribute in an html tag.

7/16/2012 - ver 1.32 - EM, header tags and &nbsp;

Now EM tags are converted to [i] bbcode tags and H1 to H6 header tags are converted to [b] bbcode tags. Also &nbsp; HTML entity is now converted to a space. Thanks to PawelW.

Conversion Process

Any HTML tags that are not listed in the table below are stripped out of the text. HTML tags listed below are converted to the equivalent BBCode, vB Code, or SMF Code, depending on your settings.

This table shows how each tag is converted:
HTML Tag Converts to:
BBCodevB CodeSMF CodeIPB Code
<BR> or <BR />Carriage ReturnCarriage ReturnCarriage ReturnCarriage Return
<P>2 Carriage Returns2 Carriage Returns2 Carriage Returns2 Carriage Returns
<H1> to <H6>2 Carriage Returns[b]2 Carriage Returns[b]2 Carriage Returns[b]2 Carriage Returns[b]
<IMG SRC="pic.jpg">[img]pic.jpg[/img][img]pic.jpg[/img][img]pic.jpg[/img][img]pic.jpg[/img]
<A HREF="">Web Page</A>[url=]Web Page[/url][url=]Web Page[/url][url=]Web Page[/url][url=]Web Page[/url]
<A HREF="">Email me</A>[]Email me[/email][]Email me[/email][]Email me[/email]
<I></I> or <EM></EM>[i][/i][i][/i][i][/i][i][/i]
<FONT FACE="arial"></FONT>
<FONT COLOR="red"></FONT>[color=red][/color][color=red][/color][color=red][/color][color=red][/color]
<FONT SIZE="5"></FONT>[size=5][/size][size=5][/size][size=5][/size][size=5][/size]
<FONT FACE="arial" COLOR="red" SIZE="5"></FONT>[color=blue][size=5]
(Note: All code within textarea is not converted.)
or [html][/html]
or [php][/php]
or [php][/php]
or [html][/html]
or [php][/php]
or [xml][/xml]
or [sql][/sql]
(Note: All code within script is not converted.)
or [html][/html]
or [php][/php]
or [php][/php]
or [html][/html]
or [php][/php]
or [xml][/xml]
or [sql][/sql]



<object width="320" height="240">
<param name="movie" value="flash.swf">
<embed src="flash.swf" width="320" height="240">


(Note: It seems that SMF cannot handle nested tables.)

<TR></TR>Carriage ReturnCarriage Return[tr][/tr]Carriage Return



<ABBR TITLE="World Wide Web">WWW</ABBR>

[acronym=World Wide Web]WWW[/acronym]

[acronym=World Wide Web]WWW[/acronym]

Last updated on August 19, 2020
Created on June 1, 2006

Back to
Subscribe to Internet Tips and Tools Feed        

User Comments

There are 15 comments.

Displaying first 50 comments.

1. Posted By: TsVk! - - January 24, 2017, 9:34 pm
Thanks very much for this handy tool.

Bookmarked for future use. :)

2. Posted By: Dave_SF - - April 11, 2017, 11:32 pm
This is related to the BBCodePaste extension I wrote for Chrome. It allows you to copy formatted HTML and paste it as formatted BBCode.

3. Posted By: asd - - February 9, 2018, 5:43 pm

4. Posted By: IM KING - - February 9, 2018, 5:44 pm

5. Posted By: Faizal sbk - - November 8, 2018, 10:40 pm
Wow this service so cool., I got benefits from it, easy to conver html to bbcode...

Thank you..hope this site stays longger...

6. Posted By: K88D - - June 9, 2019, 12:56 am
Doesn't seems to be working anymore.
It doesn't convert to other codes, it's decoding the script to text. (decompile?)
For eg.
Trying to convert this HTML code to BBcode.
The output is "Text".

7. Posted By: Jeff - - June 9, 2019, 9:22 am
Hi K88D,

In order to put html code in a comment you need to surround it with <code></code> tags. So I'm not sure what html code you were trying to convert. But I just tested the converter and it seems to be working. Could you possibly have an extension in your browser that is blocking things?


8. Posted By: Bệnh viện thẩm mỹ JW Hàn Quốc - - December 5, 2019, 7:51 pm
Tuyệt vời

9. Posted By: xx - - April 16, 2020, 8:42 pm
Thank's for your code.did this consider open source?

10. Posted By: Cheryl - - July 1, 2020, 8:42 pm

thanks for providing this handy tool!

11. Posted By: jack miller - - September 1, 2020, 11:00 am
SWF is an Adobe Flash file format used for multimedia, vector graphics it is small web format SWF is used for adobe flash player to play videos Gifts etc Programmers can generate SWF files from within several Adobe products, including Flash ,flash builder you can click here.

12. Posted By: New Life Foundationss - - March 6, 2021, 2:32 am
Thank you for sharing a tool. It helps us a lot to generate backlinks.

13. Posted By: judi ikan - - March 31, 2021, 3:31 am

this tool is very useful and make me love it...thanks a lot

14. Posted By: Robin Grice - - May 14, 2021, 5:12 am

Is there any way to show some BBcode within a BB message without it reverting back to its intended format?
i.e. as in displaying the code as code in its basic raw format.


15. Posted By: Jeff - - May 15, 2021, 12:46 pm
Hi Robin Grice,

I'm sorry, I don't know the answer to that. It could be different with each type of forum, so you would probably have to ask the makers.  You can try the [code][code] tags and see if that works.