BBCode to HTML / HTML to BBCode
Convert BBCode to HTML and HTML to BBCode with a live preview.
BBCode to HTML Converter
BBCode (Bulletin Board Code) is the lightweight markup used by forums such as phpBB, vBulletin, MyBB, SMF and XenForo, as well as many game communities and support boards. It looks like HTML with square brackets — [b]bold[/b] or [url=https://example.com]link[/url] — and it lets users format posts without being able to inject arbitrary HTML. This converter translates BBCode to clean HTML and, in the other direction, HTML back to BBCode.
BBCode → HTML
Paste a forum post and the HTML output updates instantly, together with a rendered preview below the editors. Nested tags are resolved from the inside out, so [quote][list][*][b]item[/b][/list][/quote] works as expected. Line breaks become <br> (you can turn this off), except around block elements such as lists, quotes and tables where extra breaks would create gaps. Content inside [code] and [noparse] is protected and shown literally.
HTML → BBCode
Moving an article, a release note or a product description to a forum? Switch modes and paste the HTML. Bold, italic, underline, strike, links, images, lists, quotes, code blocks, tables and inline color, font-size and text-align styles are mapped to their BBCode tags. Unknown tags are unwrapped so their text survives.
Security notes
The converter escapes everything before turning BBCode into HTML and only allows safe link protocols, so it is a reasonable base for rendering user posts. In production you should still sanitise on the server. To write posts with a toolbar, use the BBCode Editor; to simply read a post, open the BBCode Viewer.
Frequently Asked Questions
Which BBCode tags are supported?
b, i, u, s, sub, sup, url, email, img (with optional WxH size), color, size, font, center/left/right/justify, quote (with author), code, list with [*] items and numbered lists, table/tr/td/th, spoiler, hr, youtube and noparse.
Is the generated HTML safe?
The BBCode text is HTML-escaped before conversion, so raw tags typed by a user cannot inject markup. Links only allow http(s), mailto, ftp and relative URLs; javascript: links are replaced with #. Colors and sizes are validated as well.
How are headings converted to BBCode?
BBCode has no heading tag, so h1–h6 become a bold line wrapped in a size tag by default. Choose "[b] only" if your forum does not support [size].
What happens to HTML tags that have no BBCode equivalent?
They are removed but their text is kept, so no content is lost. Scripts and styles are dropped completely.