Format Code Now
/
ConvertHTML to BBCode Converter Next: HTML to Jade (Pug) Converter ›

HTML to BBCode Converter

CV-59

Paste HTML and get BBCode you can post on a forum. Common formatting tags, links, images, lists, quotes and code are converted, and everything else is reduced to its text.

Runs in your browser. Nothing is uploaded.

HTML

BBCode

How to use it

  1. Paste your HTML into the input box, or open an .html file and drop it on the box.
  2. The BBCode appears as you type.
  3. Read the output once. Tables, classes and most styles do not exist in BBCode, so only their text is kept.
  4. Copy the BBCode and paste it into your forum editor.

Which HTML becomes which BBCode

Strong and b become [b]; em, i and cite become [i]; u, s, sub and sup have matching tags; a with an href becomes [url=address] and a mailto link becomes [email]; img becomes [img] with its address; blockquote becomes [quote]; pre and code become [code]; ul and ol become [list] and [list=1] with [*] for each item; headings become [size] with [b]; a color set in style or on font becomes [color]. br and hr become a line break and [hr].

What gets dropped

BBCode has no standard form for most HTML, so classes, ids, alt text, title attributes, tables and other inline styles are removed and the text inside is kept. Table rows turn into lines of text, with a space between cells. Script, style, head, iframe and svg content is removed entirely, and so are comments. HTML entities such as & are decoded to the characters they stand for before the BBCode is written.

Check it in your forum

Forum software differs in which tags it accepts and how it names them. For example, some boards want [url] without an equals sign, or use [img=...] with sizes. Paste a short test post first. Nested lists are written inside their parent item as another [list], which most boards render, but not all of them do.

Questions people ask

How do I convert HTML to BBCode?

Paste the HTML into the input box. The BBCode is written on the right as you type. Copy it and paste it into your forum post. The converter covers bold, italic, links, images, lists, quotes and code.

Does it keep tables and CSS?

No. BBCode has no common way to describe tables or most CSS. Table content is kept as lines of text and style attributes are ignored, except for a text color, which becomes [color].

Why are my images missing alt text?

The standard [img] tag holds only the address. Alt and title text have nowhere to go, so they are dropped. If you need a caption, add it as normal text under the image.

Can it convert a whole web page?

It can read a full page, but script, style and head content is removed and only the body text and the supported tags are converted. For long pages, paste just the part you want to post.

Can I convert BBCode back to HTML?

Yes. The BBCode to HTML converter on this site does the reverse for the same common tags, escapes unsafe text and removes links with unknown schemes.

About this tool

Reads the HTML with a built-in tokenizer, not your browser. Converted: b and strong, i and em and cite, u and ins, s and strike and del, sub, sup, center, a with an href (mailto: links become [email]), img src, blockquote, pre and code (as [code]), ul and ol with li (as [list] and [list=1] with [*] items), h1 to h6 (as [size=6] down to [size=3] with [b]), br, hr, and a color set by style="color:..." or by font color. Every other tag is dropped and its text is kept: tables, classes, ids, other styles, alt text and title attributes are lost, and table rows become lines of text. Script, style, head, iframe and svg content is dropped, and so are comments. HTML entities are decoded. Whitespace is collapsed except inside pre. A nested list is written inside its parent item. Other BBCode dialects may name tags differently, so check the result in your forum preview.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.