HTML to BBCode Converter

phpBB, vBulletin, Invision Board and older MyBB installs still disallow HTML in posts but accept BBCode, the [b], [url] and [img] bracketed tags invented for Ultimate Bulletin Board in 1998. Paste HTML here and this converter rewrites each supported tag into BBCode equivalents, keeping formatting intact for a forum repost or archive export.

How to convert HTML to BBCode

  1. 1

    Paste HTML

    Any size from a rich-text snippet to a full forum post exported as HTML.

  2. 2

    Run the conversion

    Click Convert and every supported tag is rewritten to BBCode.

  3. 3

    Review the output

    Tags with no BBCode equivalent are stripped but their inner text is kept, so nothing is lost.

  4. 4

    Copy the BBCode

    Paste into the forum editor in plain-text mode.

HTML to BBCode tag mapping

The converter supports the most common forum tags and turns everything else into plain text.

Basic mapping

HTML BBCode
<br> line break
<b> or <strong> [b]...[/b]
<i> or <em> [i]...[/i]
<u> [u]...[/u]
<a href="url">text</a> [url=url]text[/url]
<img src="url"> [img]url[/img]
<blockquote> [quote]...[/quote]
<code> [code]...[/code]
<li> [*]
</p> </div> </h1> to </h6> blank line

What happens to other tags

  • <ul> and <ol>: the list wrappers are dropped and each <li> becomes its own [*] bullet line.
  • <script>, <style>, <iframe>: the tags are removed, any text inside them is kept.
  • <div>, <section>, <details> and similar containers: the tags are stripped and the inner text is kept.
  • SVG and MathML: not representable in BBCode, the inner text is kept.
  • Inline styles and attributes: not carried over, the styling is lost.

Best practice

  • Pre-clean the HTML with a formatter first to avoid nested tag confusion.
  • Test a short snippet in the forum’s preview before bulk-pasting long content.
  • Verify links, some forums disable URL auto-linking outside [url] tags.

Frequently Asked Questions

BBCode has a tiny vocabulary compared to HTML. Tags like <div>, <section> or <details> have no BBCode equivalent. The converter strips them and keeps the inner content so no information is lost.

No. BBCode has no direct equivalent for most CSS properties, so styles are dropped and the text is kept. If you need colors or sizes, add [color] or [size] tags manually in the forum editor.

Yes. <b><i>text</i></b> becomes [b][i]text[/i][/b]. Nesting is preserved as long as the forum dialect accepts it, some block nested [url] inside [img], for example.

Not in this tool, use the BBCode to HTML converter for the reverse direction. Round-tripping is lossy because HTML has far more tags than BBCode.

Related Tools

Tool available in other languages