HTML to BBCode
Convert HTML to BBCode forum markup. Transforms tags to their BBCode equivalents for forum posts.
HTML to BBCode conversion
Converting HTML to BBCode is useful when posting content from a CMS or rich-text editor to a forum like phpBB, vBulletin, or SMF. This converter handles the most common HTML tags: headings, bold, italic, underline, strikethrough, links, images, blockquotes, code blocks, and lists. Remaining HTML tags are stripped, and common HTML entities are decoded. All processing runs entirely in your browser.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Posting formatted content to a forum that accepts BBCode rather than HTML.
- Converting an article for a legacy forum thread.
- Adapting content from a CMS for a community board.
- Producing a signature or a template for forum software.
- Migrating posts into a BBCode-based platform.
Frequently Asked Questions
- What is BBCode and why does it still exist?
- A markup language for forums, using square brackets — `[b]bold[/b]` — designed so users could format posts without the software accepting raw HTML. That is still its purpose: a fixed, safe tag vocabulary with no way to inject script or break the page layout.
- Which HTML elements map cleanly?
- `strong`/`b`, `em`/`i`, `u`, `a`, `img`, `blockquote`, `code`/`pre`, and `ul`/`ol`/`li`. Those cover the vocabulary most forums implement. Anything structural — divs, tables, spans with classes — has no counterpart and is flattened.
- Is BBCode standardised?
- No, and that is the practical difficulty. phpBB, vBulletin, XenForo and Discourse each support a slightly different tag set, so `[size]`, `[color]` and `[table]` may or may not work. The core dozen tags are safe everywhere; anything beyond them needs checking.
- What happens to CSS styling?
- It is lost. BBCode has no stylesheet concept, so a `<span style="color:red">` either becomes `[color=red]` where the forum supports it or disappears. That is by design — the forum controls presentation, which is why BBCode outlived allowing HTML.
- Why not just allow HTML in a forum?
- Because it is an XSS vector and a layout hazard in one. Sanitising HTML safely is genuinely hard and has to be maintained against new attacks; a closed BBCode vocabulary is safe by construction, which is why it survived long after HTML became universal.
Common errors and gotchas
- Expecting every HTML element to have a BBCode equivalent, since most do not.
- Assuming one BBCode dialect, when tag sets vary by forum software.
- Losing nested structure, where BBCode parsers handle depth inconsistently.
- Leaving raw HTML behind, which a forum will usually escape and show as text.
- Converting tables, which most BBCode implementations do not support at all.
Related Converters tools
JSON to YAML
Convert JSON into clean, readable YAML instantly.
YAML to JSON
Convert YAML configuration into valid JSON.
JSON to XML
Convert JSON structures into nested XML markup.
HWB to HEX Converter
Convert an HWB color to HEX.
JSON to SQL
Turn a JSON array of objects into SQL INSERT statements.
CSV to XML
Convert CSV rows into structured XML records.
XML to CSV
Flatten repeated XML records into CSV rows.
INI to JSON
Parse INI config sections and keys into JSON.