Format Code Now
/
ConvertBBCode to HTML Converter Next: CSV to Multi Line Converter ›

BBCode to HTML Converter

CV-57

Paste BBCode from a forum post and get HTML you can use on a page. Bold, italic, links, images, lists, quotes and code blocks are converted, and anything unsafe is escaped.

Runs in your browser. Nothing is uploaded.

BBCode

HTML

How to use it

  1. Paste your BBCode into the input box, or open a text file and drop it on the box.
  2. The HTML appears as you type. Leave Line breaks become <br> on to keep the post layout.
  3. Check links and images in the output. Addresses that are not http, https, mailto, ftp or relative are removed.
  4. Copy the HTML or download it as a .html file.

Which BBCode tags are converted

The tool reads [b], [i], [u], [s], [sub], [sup], [url], [email], [img], [quote], [code], [list] with [*] items, [color], [size], [center], [left], [right] and [hr]. Bold and italic become strong and em, quotes become blockquote with an optional cite for the name, and lists become ul or ol. Tag names outside this list, such as [table] or [youtube], are not converted and stay in the text exactly as you typed them, so you can see what was skipped.

How links, images and raw HTML are handled

All text is HTML-escaped, so a pasted script tag appears as visible text and does not run. A link is kept only when it starts with http://, https://, ftp://, mailto:, a slash, a hash or ./ so javascript: addresses lose the link and keep the text. Images must be http or https addresses or relative paths. Text inside [code] is never parsed, which means BBCode shown as an example stays as an example. A tag that is never closed is closed at the end of the text.

Line breaks and lists

Forum posts rely on line breaks, so each one becomes a br tag by default. Turn the option off if you plan to style the output with CSS white-space instead. In a list, every [*] starts a new item and the item runs until the next [*] or the closing [/list]. Ordered lists from [list=1] or [list=a] come out as a plain ol without the numbering style, so adjust that in your own CSS if the style matters.

Questions people ask

How do I convert BBCode to HTML?

Paste the BBCode into the input box. The converted HTML appears on the right straight away. Copy it or download it as a .html file. The converter handles the common tags, such as bold, italic, links, images, lists, quotes and code blocks.

Is BBCode converted to safe HTML?

Text is escaped, so raw HTML in the post shows as text. Links that start with javascript: or another unknown scheme are dropped and only the link text stays. Images must be http, https or relative. Check the output yourself before you publish anything important.

Does it support [table], [youtube] or [spoiler]?

No. Those tags differ between forum software, so the tool does not guess. They are left in the output exactly as you typed them, which makes it easy to spot what still needs a manual fix.

Why did my [size] or [color] tag disappear?

The value must be valid. Size accepts the numbers 1 to 7, and color accepts a hex code such as #cc0000 or a plain color name. With any other value the style is skipped and the text between the tags is kept.

Can I turn HTML back into BBCode?

Yes, use the HTML to BBCode converter on this site. It covers the same common tags in the other direction, though styles, tables and other attributes are dropped because BBCode has no standard way to hold them.

About this tool

Reads these tags: [b] [i] [u] [s] [sub] [sup] [url] [url=address] [email] [img] [quote] [quote=name] [code] [list] [list=1] [*] [color=value] [size=1 to 7] [center] [left] [right] [hr]. Bold and italic become <strong> and <em>. Everything else you type is HTML-escaped, so a raw <script> tag shows up as text. A link must start with http://, https://, ftp://, mailto:, /, # or ./ ; any other address, such as javascript:, is dropped and only the link text is kept. An image must be an http(s) address or a relative path, otherwise the tag is left as text. Nothing inside [code] is parsed. A color accepts #hex or a plain color name, and a bad value is ignored. [size] 1 to 7 becomes 0.7em up to 3em, and other numbers are ignored. [list=1], a, A, i and I all give an ordered <ol>; the numbering style is not kept. A tag that is never closed is closed at the end of the text, and a closing tag with no opener stays as text. Not supported: [table], [youtube], [spoiler], [font], smilies, and any tag name not listed here, which stay as typed. By default every line break becomes <br>; turn the option off to keep them as plain newlines.

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