FormatterHQ

HTML to BBCode Converter

Turn HTML or rich text into BBCode you can paste into forums. Headings, links, images, lists, quotes, code blocks, tables and inline styles are converted.

Input HTML
Output TEXT
Ready.

How to use the HTML to BBCode Converter

  1. Paste your HTML (for example an article or release notes) into the input editor.
  2. Convert it to BBCode.
  3. Check the result; preview it in a BBCode viewer if you like.
  4. Copy the BBCode and paste it into your forum post editor.

Post web content to forums without losing formatting

Forums that use BBCode usually strip HTML from posts, so pasting an article, changelog or product description loses its bold text, links and lists. This HTML to BBCode converter walks through your HTML and writes the matching BBCode tags, so your formatting survives.

Example

<h2>Release 2.4</h2>
<p>This update makes <strong>search faster</strong> and fixes <a href="https://example.com/bugs">12 bugs</a>.</p>
<ul>
  <li>New <em>dark mode</em></li>
  <li>Improved <span style="color: green">sync</span></li>
</ul>
[size=5][b]Release 2.4[/b][/size]

This update makes [b]search faster[/b] and fixes [url=https://example.com/bugs]12 bugs[/url].

[list]
[*]New [i]dark mode[/i]
[*]Improved [color=green]sync[/color]
[/list]

How HTML maps to BBCode

  • Text styles – strong/b → [b], em/i → [i], u → [u], del/s → [s], mark → [highlight].
  • Headings – BBCode has no universal heading tag, so headings become bold text in a larger [size] (h1 = 6 down to h6 = 2).
  • Links and images – [url=…], [email] for mailto links, and [img] with a WxH size when width and height are set.
  • Lists – ul → [list], ol → [list=1] (or a, i… for other numbering types).
  • Blocks – blockquote → [quote], pre → [code] (keeping a language-* class as [code=lang]), details → [spoiler], hr → [hr].
  • Tables – rows and cells become [table], [tr], [td] and [th].
  • Inline CSS – color, font-size, font-family, bold, italic, underline, strike-through and text-align in style attributes are turned into the matching tags. Legacy <font> tags are handled too.
  • YouTube embeds – an embedded YouTube iframe becomes [youtube]VIDEO_ID[/youtube].

Converting text pasted from Google Docs or Word

Rich text copied from a word processor arrives as HTML in which nearly every run of text is a span with inline styles: a font family, a size in points, sometimes a color. Because the converter turns inline font-family, font-size and color into BBCode, such a paste can come out wrapped in [font=Arial] and [size] tags around every sentence.

Forum readers rarely need those. For a clean post, paste the text into a plain HTML editor or your CMS first, so that only structure (headings, bold, links, lists) remains, then convert. If you want to see what the pasted markup really contains, run it through the HTML formatter before converting; long chains of styled spans are easy to spot once the code is indented.

Forum compatibility

Core tags (b, i, u, url, img, quote, code, list, color, size) work almost everywhere. [table], [spoiler], [youtube] and [highlight] depend on the forum software or installed extensions, and [size] may use a 1–7 scale on one board and pixels or percentages on another. If a tag shows up literally in your post, your forum does not support it; remove it or replace it with plain text.

Tips

Scripts, forms and most layout wrappers have no BBCode equivalent and are reduced to their text. For the cleanest result, convert just the article body rather than a whole page. Check how the post will look with the BBCode viewer, or convert BBCode back with BBCode to HTML. If your source is Markdown, render it first with Markdown to HTML. Everything runs locally in your browser.

Frequently asked questions

Which forums accept the generated BBCode?
phpBB, MyBB, vBulletin, SMF, XenForo and most other BBCode forums accept the core tags. Tables, spoilers and video embeds depend on the specific forum and its extensions.
How are headings converted?
Because BBCode has no standard heading tag, each heading becomes bold text inside a size tag, with larger sizes for higher-level headings.
Are CSS classes converted?
No. Only inline style attributes and HTML elements are converted. Styles that come from class names in external stylesheets are not visible to the converter.
Can I convert text copied from a web page?
Yes, if you paste its HTML. Copy the page source or use your browser’s developer tools to copy the HTML of the article element, then paste it here.

Last updated September 26, 2026

Related tools

BBCode to HTML Converter Convert forum BBCode such as [b], [url], [quote], [list] and [code] into clean, safe HTML markup instantly. BBCode Viewer Preview BBCode forum posts before publishing: bold, colours, links, quotes, lists, code and spoilers rendered live. CSV to HTML Table Converter Convert CSV to HTML online for free. Get clean table markup with a live preview. Excel to HTML Table Converter Convert Excel to HTML online for free. Get clean table markup with a live preview. HTML Entities to Text Turn HTML entities (named, decimal and hex) back into plain Unicode text. HTML Table to CSV Converter Convert HTML to CSV online for free. Nested data is flattened into columns. HTML to Jade Converter Turn HTML into Jade syntax for legacy .jade views, using only markup that also keeps working after an upgrade to Pug. HTML to JSX Converter Convert HTML markup to valid JSX for React: className, htmlFor, style objects, self-closing tags and comments handled automatically. HTML to PHP Converter Convert HTML into PHP echo statements, a string variable or a heredoc block with every quote and dollar sign safely escaped. HTML to Pug Converter Convert HTML to Pug template syntax: indentation-based tags, #id and .class shortcuts, attributes and text blocks. HTML to Text Converter Extract readable plain text from HTML: keeps paragraphs, headings, lists and tables, drops tags, scripts and styles. Hyperlink Generator Generate a hyperlink as HTML, Markdown, BBCode and plain text at once - ready for websites, READMEs, forums and e-mails.