BBCode to HTML Converter

BBCode was the lightweight markup of the forum era, [b]bold[/b], [url], [quote], [code]. Every phpBB, vBulletin, XenForo and SMF board used it, and millions of posts across those platforms still exist. This converter parses BBCode and outputs clean, valid HTML you can paste into a modern CMS, a static site or a Markdown-to-HTML pipeline that does not understand forum tags.

How to convert BBCode

  1. 1

    Paste your BBCode

    Whole posts or snippets. Nested tags are handled.

  2. 2

    The parser tokenises opening and closing tags

    Matching `[tag]...[/tag]` pairs produce the corresponding HTML element.

  3. 3

    Tag attributes are mapped

    Things like `[color=red]`, `[size=18]` or `[url=https://...]` become inline styles or `href` attributes.

  4. 4

    Copy the HTML

    Ready for a blog post, a documentation page or a forum migration.

Supported tags

BBCode HTML output
[b]text[/b] <strong>text</strong>
[i]text[/i] <em>text</em>
[u]text[/u] <u>text</u>
[s]text[/s] <del>text</del>
[url]link[/url] <a href="link">link</a>
[url=link]text[/url] <a href="link">text</a>
[img]link[/img] <img src="link">
[quote]q[/quote] <blockquote>q</blockquote>
[code]c[/code] <pre><code>c</code></pre>
[list][*]a[*]b[/list] <ul><li>a</li><li>b</li></ul>
[color=red]t[/color] <span style="color:red">t</span>
[size=18]t[/size] <span style="font-size:18px">t</span>

Security notes

BBCode is safe by design; HTML is not. Converting user-submitted BBCode to HTML is the classic moment a forum introduced XSS in 2005. If you are publishing converted output:

  • Escape any raw text inside BBCode tags.
  • Whitelist the tags your converter emits, do not forward unknown tags as raw HTML.
  • Validate URLs in [url] and [img] to block javascript: and data: schemes.

This tool does not rewrite the URLs you provide, so check them before publishing converted output.

Migrating a whole forum

For moving thousands of posts, run the converter as a pipeline: export posts as BBCode → run through this converter → import the HTML. Spot-check a few dozen posts with unusual nesting or custom emoji codes that may not be in the standard tag set.

What BBCode does not map cleanly

  • Custom forum smilies (:D and :)), leave as is and render with CSS, or pre-process them separately.
  • Plugin-specific tags (like [spoiler], [youtube]) are not recognised, so they pass through as literal text.
  • Unclosed tags stay as literal text: the parser makes no attempt to close or repair them.

Frequently Asked Questions

Yes: Steam community posts, vBulletin and XenForo boards, some wikis and many legacy phpBB installs. It also survives as the underlying markup in a handful of game-server control panels.

Not this tool, use the HTML to BBCode converter. Going back is lossier because HTML is much more expressive than BBCode.

Unknown tags pass through as literal text, because the converter only recognises the tags listed in the table above.

Nesting works when the tags are different, for example [b] inside [quote]. A tag nested inside itself, such as a quote inside a quote, is closed at the first closing tag and the rest stays as text, so flatten such posts before converting.

Related Tools

Tool available in other languages