What Is BBCode and How Do You Convert It to Regular HTML?
BBCode is the old forum markup that uses square brackets instead of angle brackets. If you need to turn it into real HTML, the job is basically translation: [b] becomes <strong>, [i] becomes <em>, and link or image tags map to standard elements. If you want to do that without hand-editing a wall of text, use this BBCode to HTML tool.
What BBCode actually is
BBCode stands for Bulletin Board Code. It was designed for forums and message boards where letting users paste raw HTML would have been a security nightmare, or at least a moderation headache.
The syntax is intentionally simple. Tags live in brackets, usually with opening and closing pairs like [quote]...[/quote] or [code]...[/code], and some tags carry attributes such as [url=https://example.com]. That makes BBCode easy to type in a plain text box and easy for a parser to recognize.
BBCode still shows up in exported forum archives, CMS backups, old support docs, and posts copied from software that never fully left the 2000s. If you see bracketed formatting that looks like lightweight HTML but is not valid HTML, you are probably looking at BBCode.
How BBCode conversion maps to HTML
BBCode conversion is not magic. It is a rule set: each tag has a corresponding HTML element, and nested tags become nested elements.
A few common mappings look like this:
[b]text[/b]→<strong>text</strong>[i]text[/i]→<em>text</em>[url]https://example.com[/url]→<a href="https://example.com">https://example.com</a>[url=https://example.com]docs[/url]→<a href="https://example.com">docs</a>[img]https://example.com/a.png[/img]→<img src="https://example.com/a.png" alt="">
There is one detail people miss all the time: BBCode tags often imply behavior that HTML does not. For example, a forum [quote] tag might include the quoted author, the thread URL, or extra styling that has no exact one-to-one HTML equivalent.
That means a good conversion should preserve meaning first, visual styling second. If the source says “this is a quote from someone,” keep it as a semantic blockquote. If the source says “make this red and bold,” you may need a span with classes or inline styles, depending on where the HTML will live.
Why developers still run into BBCode
Most of the time, BBCode appears during migration. You are moving a forum, rebuilding an old knowledge base, or pulling content out of a legacy database and trying to make it usable on a modern site.
It also shows up in content cleanup. Maybe you have a dump full of posts with broken tags, inconsistent nesting, or half-converted markup. In that situation, BBCode conversion is usually one step in a larger repair job: decode the source, normalize the structure, then publish clean HTML.
Sometimes the goal is not migration at all. You may just want to preview an old post in a browser, render archived content in a static site, or feed a BBCode-heavy dataset into a pipeline that expects HTML. If you are doing bulk text work like this, our guide on how to convert text or images to ASCII art scratches the same itch: take one representation and make it legible in another.
Common pitfalls when converting BBCode
Broken nesting is the classic trap. BBCode parsers usually expect tags to close in the right order, and when they do not, the output can get messy fast.
For example, this is valid:
[b][i]nested[/i][/b]But this is not:
[b][i]nested[/b][/i]If the source is malformed, a converter has to guess whether to recover, ignore the problem, or preserve the broken text as-is. That is why some conversions look fine for clean forum posts but fall apart on scraped archives.
Another issue is escaping. BBCode text can contain literal brackets, URLs with query strings, or user-supplied content that should not become active HTML. Good conversion needs to escape characters like <, >, and & so the output stays safe and valid.
Finally, some BBCode tags have no real HTML equivalent. Things like [size], [color], or forum-specific [spoiler] tags may need custom CSS or extra wrappers. There is no universal mapping because different forums invented their own dialects.
When HTML is the better endpoint
HTML is the right target when the content needs to live on the web, inside a CMS, or in a rich text editor that understands standard elements. It is also the better format when you need accessibility, consistent styling, or downstream tooling that expects actual tags instead of forum syntax.
The semantic gap matters. A [b] tag is really a style hint; <strong> carries meaning that screen readers and search engines can understand better. Same with [quote] mapping to <blockquote> instead of a generic div.
If you are rebuilding content for a website, HTML gives you more control over layout and behavior. You can add classes, attach CSS, improve accessibility, and fit the result into a templating system without teaching the rest of your stack what BBCode is.
What a good conversion workflow looks like
For small snippets, paste the BBCode into a converter, inspect the output, and tweak the result if needed. For larger migrations, it helps to separate the problem into stages: detect the tags, convert the known ones, flag unknown tags, and review the broken records manually.
A practical workflow often looks like this:
- Copy the raw BBCode from the source system.
- Run it through a converter.
- Check links, quotes, and nested formatting first.
- Fix any tags that are forum-specific or malformed.
- Validate the resulting HTML in your CMS or browser.
That last step matters more than people think. A conversion can be syntactically valid and still look wrong if the original BBCode relied on forum CSS, custom parsing rules, or shortcuts that never made sense outside that platform.
Before and After
Here is a real-world style example of how BBCode conversion should behave.
[quote=Lin]Use the API docs from [url=https://example.com/docs]the reference page[/url].[/quote]
[b]Release notes:[/b]
- Fixed auth header parsing
- Added retry logic
[i]Test before deploying.[/i]A clean HTML result would look like this:
<blockquote>
<p>Use the API docs from <a href="https://example.com/docs">the reference page</a>.</p>
<footer>Lin</footer>
</blockquote>
<p><strong>Release notes:</strong></p>
<ul>
<li>Fixed auth header parsing</li>
<li>Added retry logic</li>
</ul>
<p><em>Test before deploying.</em></p>Notice what changed. The link stayed a link, the quote became a proper blockquote, and the list turned into semantic HTML instead of plain hyphen lines. That is the difference between a literal conversion and a useful one.
Frequently Asked Questions
Is BBCode still used today?
Yes, mostly in legacy forums, old exports, and niche community software. Newer platforms usually prefer Markdown or rich text editors, but BBCode keeps hanging around because old content does not disappear just because the UI changed.
Can BBCode be converted to HTML automatically?
Most common tags can be converted automatically, especially bold, italic, links, images, quotes, and lists. The tricky part is handling malformed input and forum-specific tags that do not have a perfect HTML match.
Is BBCode safer than HTML?
Usually, yes, because it limits what users can type and keeps raw HTML out of the editor. But BBCode is only safer if the parser is implemented correctly and the output is still escaped before it hits the page.
What is the difference between BBCode and Markdown?
Both are lightweight markup systems, but Markdown uses punctuation-like syntax such as **bold** and [link](url), while BBCode uses bracketed tags like [b] and [url]. Markdown is more common on modern platforms, but BBCode is still the old forum veteran that refuses to leave.
Wrapping Up
BBCode conversion is mostly about preserving intent while changing syntax. If the source is clean, the mapping is straightforward. If the source is messy, you need to watch for broken nesting, custom tags, and text that only looked right inside the original forum engine.
For a quick one-off conversion, a browser tool is usually enough. For migration work, convert a sample batch first, inspect the HTML, then decide whether you need manual cleanup or a custom script on top.
When you are ready to turn bracket soup into usable markup, give the BBCode to HTML tool a spin and see how much of the grunt work disappears.