Convert BBCode to HTML and HTML to BBCode
Turn forum BBCode into HTML, or HTML into BBCode you can paste into a forum post
Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.
Did this tool do the job?
Thanks, your feedback came through.
How it works
BBCode is the square-bracket markup used by forum software such as phpBB, vBulletin, MyBB and SMF. If you are moving posts from an old forum to a website or blog, choose BBCode → HTML and paste the post into the left pane: [b]Notice[/b] becomes <strong>Notice</strong>, [url=https://example.com]rules[/url] becomes a working link and [quote=Emily] becomes a quote box. Line breaks are kept as <br>. For the opposite job, posting formatted text from a web page on a forum, choose HTML → BBCode. An unclosed tag ([i] without [/i]) or a forum-specific tag the tool does not know is left as text; the result line tells you how many tags were converted and how many stayed as text.
This tool is also known as bbcode to html, bbcode to html converter, html to bbcode, html to bbcode converter, convert bbcode online.
What is BBCode?
BBCode (Bulletin Board Code) is a simplified, safer stand-in for HTML that forum software offers its users. Tags are written in square brackets, and the forum turns them into HTML when it shows the post. Since users cannot write HTML directly, they cannot inject scripts into the page. The basic tags are the same everywhere; sizes and extra tags vary between packages.
What is HTML escaping?
HTML escaping means replacing characters such as < > & " ' with forms the browser will not read as tags (< > &). Even if the text contains <script>, the browser shows it letter by letter instead of running it. When HTML is built from BBCode, every piece of plain text is escaped; only the tags the tool itself writes become real HTML.
What is the difference between BBCode and HTML?
HTML is the language of web pages; the browser reads it directly and it can contain scripts. BBCode is a restricted language designed for forums: only certain formats exist, there are no scripts, and the forum software turns every tag into HTML under its own control. BBCode is enough to show what users write safely, but designing a page takes HTML.
Supported tags
The tags below mean the same thing in almost every forum package. Tags specific to your forum (spoiler, youtube, hide and so on) differ between packages, so they are not converted and stay as text.
- [b] [i] [u] [s] → bold, italic, underline, strikethrough
- [url]address[/url] and [url=address]text[/url] → link
- [img]address[/img] and [img=widthxheight] → image
- [quote] and [quote=Name] → quote box with the author's name
- [code] → code block; BBCode inside it is not processed
- [list], [list=1], [list=a] and [*] → bulleted or numbered list
- [color=red] or [color=#c0392b], [size=150], [center] [left] [right]
Safety: why a forum post is not pasted into a page as is
Anyone can write a forum post, and someone may have slipped code into it. So the tool takes two precautions. First, all plain text in the post is escaped: if someone typed <script>, readers only see that text and nothing runs. Links and images are converted only when the address starts with http or https; addresses starting with javascript: or data: are left as text together with their tag. A color value can only be a color name or a hex code.
Then the resulting HTML goes through a mature sanitizing library (DOMPurify) once more. If anything is removed, the result line says how many items were cleaned out.
Size values differ between forums
The number in [size] does not mean the same thing everywhere. phpBB uses percent: [size=150] means 150 percent of normal text. vBulletin and MyBB use a scale from 1 to 7. The tool maps 1 to 7 to that old scale (small to very large) and 8 or more to a percentage. In the other direction, a font-size in percent is written as a percentage and a named size as the 1 to 7 scale.
Frequently asked questions
What is BBCode and where is it used?
BBCode is a simple markup language that lets forum users format text without writing HTML. Tags go in square brackets: [b]bold[/b]. Forum software such as phpBB, vBulletin, MyBB, SMF and XenForo uses it, and some gaming and community sites support it too.
What happens to an unclosed tag?
It stays as text. If you type "[i]important" and never close it with [/i], the result shows [i]important; no italics are applied and nothing is lost. Most forum packages behave the same way.
What happens to tables when converting HTML to BBCode?
BBCode has no standard table tag. Table rows become plain lines with cells separated by tabs. If your forum has a [table] extension, you will need to rewrite the table in that format by hand.
Is my text uploaded anywhere?
No. The conversion and the safety filter run in your browser; the text you paste stays on this page.