BBCode to HTML Converter

Convert forum BBCode — [b], [url], [quote], [list=1/a/i] and more — to HTML and back, escaping input first so raw markup can't break out.

HTML output
Result: 4 lines, 175 characters
<strong>Bold</strong> and <em>italic</em>
<a href="https://example.com">A link</a>
<ul><li>First item</li><li>Second item</li></ul>
<ol><li>Step one</li><li>Step two</li></ol>
Preview

What is BBCode?

BBCode (Bulletin Board Code) is a lightweight markup language used on forums and message boards to format posts without exposing raw HTML. Instead of angle brackets, it wraps text in square-bracket tags such as [b]bold[/b], [url=https://example.com]a link[/url], or [quote]a quotation[/quote]. This converter turns that markup into standard HTML you can drop into a web page, email template, or CMS. It supports the tags forums use most: [b], [i], [u], [s], [url], [img], [quote], [code], [list], [*], [color] and [size], plus the layout tags posts are full of: [h1]–[h6], [p], [sup], [sub], [center], [left], [right], [justify] and [align=…], [font=…], [ul]/[ol] with [li], and [hr]. [quote=Author] keeps the author as a <cite>. Lists can be unordered ([list]) or ordered — [list=1] for numbers, [list=a] for letters, and [list=i] for roman numerals. The tags are the core set phpBB, MyBB, vBulletin and SMF all share — [b], [i], [u], [url], [img], [quote], [code], [list] and [color] — plus the common extras: [table] with [tr] rows of [th] or [td] cells, [spoiler] and [spoiler=Title] as a fold the reader opens, [email] as a mailto: link, and [youtube], which takes a video id or a watch, youtu.be, embed or shorts link and writes the player from YouTube's no-cookie address. An address or a video the tag cannot read stays as typed. [size=n] is read as n pixels.

How the conversion stays safe

Every character you type is HTML-escaped before any tag is replaced, so raw HTML in your source is shown literally and can never break out of the output. Link and image URLs are checked and dangerous schemes like javascript: are neutralised, and color and font values are limited to a safe character set. Unclosed or unrecognised tags are simply left as plain text rather than guessed at, so nothing gets mangled. The Preview under the HTML shows the converted post in a sandboxed frame where no script can run, and Turn line breaks into <br> writes a <br> at each line break, the way the board displayed the post. The frame loads no other page, so a [youtube] video shows there as an empty box; the HTML you copy plays it.

Both directions, a tag bar and a link

Set Direction to HTML → BBCode to go the other way: the HTML is read as a document without running a script or loading an image, and every tag this page writes — bold, italic, links, images, quotes, lists, headings, color, size, font, alignment, code, tables, spoilers and YouTube players — is written back as BBCode (an email link comes back as a [url] to its mailto: address), with the preview drawing that BBCode as a board would. Turning the direction takes the current answer along as the new input, so a round trip is one click. In the BBCode → HTML direction, the Insert tags bar over the box wraps the selection in [b], [i], [u], [s], [url], [img], [quote], [code] or [list]. Copy link puts the post and the direction in the link it copies, to send or come back to; a post too long for a link gets a note instead.

Frequently asked questions

Which BBCode tags are supported?

The converter handles the most common forum tags: [b], [i], [u], [s], [url] (with or without a target), [img], [quote], [code], [list] (unordered) and [list=1]/[list=a]/[list=i] (ordered) with [*] items, [color], and numeric [size] — plus [quote=Author], headings [h1]–[h6], [p], [sup], [sub], alignment ([center], [left], [right], [justify], [align=…]), [font=…], [ul]/[ol] with [li], [hr], and the common extras [table] with [tr], [th] and [td], [spoiler] and [spoiler=…], [email] and [email=…], and [youtube]. Nested tags such as [b][i]text[/i][/b] are resolved too, and a quote inside a quote nests.

What happens to an unclosed or unknown tag?

It is left as literal text rather than guessed at. For example [b]hello with no closing tag stays exactly as typed, so your content is never silently rewritten.

Can I see how the post will look?

Yes. The Preview under the HTML draws the converted post in a sandboxed frame: nothing in it can run script, and only inline styles and https or data: images load, so the [img] tags show and nothing else is fetched — a [youtube] player included, which shows there as an empty box, though the copied HTML plays it. Tick Turn line breaks into <br> to have each line break become a <br>, the way the board displayed the post — except beside a heading, list, quote or other block, where it would add an empty line, and inside [code].

Can it turn HTML back into BBCode, write the tags for me, or share a post?

Yes. Set Direction to HTML → BBCode and paste HTML: it is read as a document with no script run and no image loaded, script and style are dropped, and every tag this page produces comes back as BBCode — bold, italic, underline, strikethrough, links, images, quotes with their author, lists with their type, headings, sup and sub, color, size and font, alignment, rules, tables, spoilers with their title, YouTube players, and code kept as typed; an email link comes back as a [url] to its mailto: address. The preview then draws that BBCode as a board would, and turning the direction carries the current answer across as the new input. In the BBCode → HTML direction, Insert tags over the box wraps the selection in [b], [i], [u], [s], [url], [img], [quote], [code] or [list] and leaves it selected, so a second tag goes round the first; [list] makes each selected line an item. Copy link puts the post and the direction in the link it copies; a post too long for a link gets a note instead.

Does it convert tables, spoilers, email links and YouTube videos?

Yes. A [table] of [tr] rows holding [th] or [td] cells becomes an HTML table, a table inside a cell included; [spoiler] and [spoiler=Title] become a fold the reader opens; [email] and [email=…] become a mailto: link; and [youtube], given a video id or a YouTube link, becomes the player from YouTube's no-cookie address. An address or a video the tag cannot read stays as typed. The preview keeps frames out, so a video shows there as an empty box, but the HTML you copy plays it, and HTML → BBCode turns tables, spoilers and players back into their tags.