Skip to main content

Converting Markdown to BBCode for Forum Posts That Use Bracket Tags

A practical guide to converting Markdown to BBCode for phpBB-style boards, with the full tag mapping for bold, italic, links, code blocks and lists.

Published By Li Lei
#markdown #bbcode #forums #phpbb #text-conversion

Converting Markdown to BBCode for Forum Posts That Use Bracket Tags

Most of the writing I do lives in Markdown. README files, changelogs, draft reviews, the notes I keep for a side project. Then a community forum asks for the same content and refuses to read a single asterisk. phpBB, vBulletin, XenForo and a long list of game and hobby boards expect BBCode, the bracket tag language, and nothing else. Paste raw Markdown and you get a wall of ** and # characters that nobody wants to read.

This post walks through how Markdown maps onto BBCode tag by tag, where the two formats genuinely disagree, and how to move a finished Markdown document onto a bracket-tag board without re-typing it.

What BBCode actually is

BBCode (Bulletin Board Code) is a small, fixed tag language built for forum software. Instead of HTML's angle brackets it uses square brackets, and instead of HTML's hundreds of elements it gives you a couple of dozen safe ones. Bold is [b]text[/b]. A link is [url=https://example.com]label[/url]. Boards prefer it because it cannot inject scripts or arbitrary CSS, so a guest post stays harmless no matter what someone pastes.

That safety is also why BBCode is smaller than Markdown in a few important places. There is no heading element, the link syntax flips the order of label and address, and inline code and fenced blocks collapse into a single tag. Knowing those three differences up front saves a lot of confusion when you stare at the converted output.

The tag mapping, piece by piece

Here is the part most people want. These are the conversions that cover the markup actual posts use:

  • Bold: Markdown **bold** (or __bold__) becomes [b]bold[/b].
  • Italic: Markdown *italic* (or _italic_) becomes [i]italic[/i]. A combined ***text*** nests as [b][i]text[/i][/b].
  • Strikethrough: ~~gone~~ becomes [s]gone[/s].
  • Links: [label](url) becomes [url=url]label[/url] — note the order flips, address first.
  • Images: ![alt](url) becomes [img]url[/img]. BBCode embeds by URL only, so alt text drops.
  • Inline code and code blocks: both a backtick span and a fenced ` block become a [code]…[/code] block.
  • Bullet lists: dash, asterisk or plus lines collapse into one [list] container with [*] item markers.
  • Numbered lists: 1. or 2) lines use [list=1] so the board renders digits.
  • Quotes: a > line becomes a [quote]…[/quote] block.
  • Headings: there is no heading tag, so each # line becomes bold text at a stepped-down size using [size].

The link flip is the one that trips people up. Markdown writes the label first and the URL second; BBCode puts the URL inside the opening tag. So [docs](https://toolora.com) comes out as [url=https://toolora.com]docs[/url]. That reversal is correct, not a glitch, and it is exactly what every forum parser expects to find.

A worked example

Say you keep this release note in Markdown:

## Version 2.1

Fixed the **login timeout** and a few small things.

- Faster startup
- New *dark theme*
- See the [changelog](https://toolora.com/changelog)

Install with:

`npm install toolora@2.1`

Converted to BBCode, that same snippet becomes:

[size=130][b]Version 2.1[/b][/size]

Fixed the [b]login timeout[/b] and a few small things.

[list]
[*]Faster startup
[*]New [i]dark theme[/i]
[*]See the [url=https://toolora.com/changelog]changelog[/url]
[/list]

Install with:

[code]npm install toolora@2.1[/code]

Notice three things. The ## heading turned into bold inside a [size] wrapper because BBCode has no h2. The three bullet lines collapsed into one [list] container rather than three separate lists. And the inline backtick span became a full [code] block — on most boards that renders as a small monospace box rather than flowing inside the sentence, which is simply how BBCode treats code.

Posting Markdown-written content to phpBB-style boards

In practice the workflow is short. Write or keep your content in Markdown the way you already do, then convert it once and paste the bracket version into the board's reply box. The Markdown to BBCode converter does the mapping above in real time: paste on the left, copy clean BBCode on the right, click to copy. Nothing is uploaded; the whole thing runs in the browser tab.

I tested this last week with a changelog I had been maintaining in a repo for months. The phpBB board I cross-post to had been turning every heading into a literal ## and every bullet into a stray dash, so I had been hand-fixing each post. Pasting the Markdown through the converter and copying the result took about ten seconds, and the post landed with real bold headings, a proper [list], and a [code] block for the install command — matching the GitHub release page my testers already knew. The part that surprised me was how little cleanup the output needed; I expected to chase stray tags and found none.

A few details worth keeping in mind when you post:

  • If your board strips [size], headings still show as bold at body size. That is the closest BBCode can get, so do not treat it as a failure.
  • Snake_case identifiers like my_var_name stay intact. They are not converted to italics, so code names survive.
  • A link with no label, [](https://toolora.com), becomes a bare [url]https://toolora.com[/url], which most boards render as a clickable address.

When you want the other direction or another format

BBCode is only one destination. If you are pulling content the other way — taking a forum post written in bracket tags and turning it into a web page — the BBCode to HTML converter handles that mapping, including the same [url], [code] and [list] tags read in reverse. And if the target is a web page rather than a board, converting Markdown straight to HTML keeps real heading tags that BBCode cannot offer.

The short version: pick the converter that matches where the text is going. For a phpBB, vBulletin or XenForo reply box, BBCode is the format, and the bracket tags above are the full vocabulary you need.


Made by Toolora · Updated 2026-06-13