Cookies This site keeps only what it needs to work. There is no analytics and no advertising on it today, and nothing here follows you to other sites. Read the privacy policy

Choose what to allow
+92 312 8299940Free Quote
Free tool, nothing to install

BBCode To HTML Converter
BBCode, HTML And Pug With A Preview

This BBCode to HTML converter turns forum markup into clean HTML. It also writes BBCode and Pug, and it shows a safe preview. We upload nothing.

  • FreePrice
  • 3Formats
  • NoneSign-up
  • NoneUploads

BBCode to HTML Converter

Turn BBCode, HTML and Pug into each other, with a live preview

Lines
0
Elements
0
Size
0 B
Preview

The preview appears here.

Ready. Paste your markup and pick the formats.

Your browser does all of the work here, in this tab. We upload nothing, store nothing and log nothing.
The short version

What A BBCode To HTML Converter Does For You

BBCode is the markup of old forums. First, you type a tag in square brackets, and the board turns it into bold text, a link or a quote. Also, other sites use HTML, and some use Pug. So you often need to move text from one to another.

This tool does that in one box. First, paste your markup. Then pick the format you have and the format you want. The result appears as you type, and a preview shows how it looks.

It reads BBCode, HTML and Pug. Then it writes the same three. So that makes six pairs, and each one works the same way.

Everything runs in your browser. So your text never leaves your device. That matters, because posts and templates often hold names and private notes.

BBCode To HTML, Tag By Tag

First, the tool reads each tag in brackets. Bold, italic, underline and strike become strong, em, u and s. A link becomes an anchor, and a quote becomes a blockquote with the author name in a cite tag.

Drawing of BBCode with bold, link and quote tags on the left and an arrow to the same text as HTML on the right
BBCode tags become HTML tags.

Also, lists work. Each star starts a new item, and an equals sign picks a numbered list. Color and size tags become spans with a style, and the center, left and right tags set the text alignment.

Code blocks keep their text exactly as you typed it. So a tag inside a code block stays a tag, and nothing in it turns into markup.

For more detail, see: Wikipedia article on BBCode.

A Safe BBCode Viewer

Next, the preview works as a BBCode viewer. It draws the result one element at a time, so nothing in your text can run. Only a short list of tags comes through.

BBCode to HTML converter showing BBCode with a quote and a list, the HTML result and a live preview below
BBCode in, HTML and a preview out.

Also, links open in a new tab with nofollow, and only web and mail addresses count. The tool drops a link that starts with javascript, and its text stays.

Images show as a small label instead of a picture. So that keeps the page from loading files from other sites.

HTML To BBCode

The reverse works too. First, paste HTML, and the tool writes BBCode you can post on a forum. Strong and b become the bold tag, em and i become italic, and an anchor becomes a url tag.

Then lists, quotes and code blocks keep their shape. Also, headings become a bold, larger line. The tool drops tags that BBCode has no word for, and their text stays.

The tool leaves out scripts, styles and the head of a page. So you get clean text for a post.

HTML To Pug And Pug To HTML

Pug, which people once called Jade, is a short way to write HTML. It drops the angle brackets and closing tags. Then it uses indents. A div with an id and a class becomes a line such as hash order dot card.

Markup converter set to HTML as the input and Pug as the output, showing short indented Pug lines
HTML written as Pug.

First, the tool writes Pug from your HTML, with tags, ids, classes and attributes. Then it also reads Pug back into HTML, with two spaces of indent and one element per line.

Also, it reads the markup part of Pug. Loops, conditions, mixins and includes need the Pug engine, so the tool skips those lines and tells you how many.

Safe Links, Colors And Sizes

First, the tool checks each value before it writes it. A color must be a hex code or a plain color name. A size must be a number from one to seven, or a small pixel size. A link must start with http, https or mailto.

So a bad value never ends up in your HTML. The tool drops the tag, and its text stays.

Line Breaks And Entities

First, a new line in BBCode becomes a br tag. The tool swallows a line break right after a quote, list or code block, because the block already starts a new line.

The tool escapes special characters. A less than sign becomes an entity in the HTML, so it cannot open a tag by accident.

Safe By Design

First, the tool reads your markup as text and never hands it to the browser as code. So a script tag cannot run, and an event handler cannot fire.

The preview follows the same rule. It builds each element by hand from a short list of safe tags, so even a hostile post cannot touch your page.

How it works

Using The BBCode To HTML Converter, Step By Step

Four steps take you from one markup to another.

  • 1

    Paste your markup

    Paste BBCode, HTML or Pug, open a file, or try the sample.

  • 2

    Pick two formats

    Choose what you have and what you want. Swap them with one click.

  • 3

    Check the preview

    Look at the live preview to see how the result reads.

  • 4

    Copy or save

    Copy the result, or save it with the right file type.

Why this one

What This Markup Converter Does Differently

It reads three formats, it previews safely, and it keeps your text private.

  • Three formats

    BBCode, HTML and Pug, in every direction.

  • Live preview

    See the result drawn as you type.

  • Checked values

    The tool tests links, colors and sizes before they go out.

  • Code blocks stay raw

    Tags inside a code block never turn into markup.

  • Clear notes

    The tool counts the Pug lines it cannot convert for you.

  • Nothing leaves your tab

    Your browser does the work. We never see your text.

Good habits

Habits For Moving Markup Between Formats

A few habits keep your posts and pages clean.

  • Close every tag. An open bold tag can bold the rest of your post.
  • Nest tags in order. First, close the inner tag before the outer one.
  • Use full web addresses. Start links with https so they work everywhere.
  • Keep code in code tags. The code tag shows text exactly as you typed it.
  • Check the preview. A quick look catches broken lists and quotes.
  • Know your board. Each forum supports a different set of tags. Test one post first.
  • Indent Pug with spaces. Two spaces per level keeps the tree clear.
  • Keep logic out of the input. Loops and mixins need the Pug engine, not this converter.
  • Test with a small sample. Convert a few lines first. Then convert the whole post.
  • Keep the original. The tool never changes your source, but a copy costs nothing.
  • Mind private text. Remove names and emails before you share a result.
Worth avoiding

Common Markup Mistakes This Tool Prevents

Each of these quietly breaks a post. The converter guards against them.

  • Unsafe links

    The tool drops a link that starts with javascript.

  • Tags in code blocks

    Text inside a code tag stays plain.

  • Unclosed tags

    Stray closing tags stay as text instead of breaking the page.

  • Bad colors and sizes

    Only valid values reach the HTML.

  • Lost line breaks

    Each new line becomes a br tag.

  • Uploading private posts

    Many converters send your text to a server. This one never does.

Questions

BBCode To HTML Converter Questions People Ask

Is this BBCode to HTML converter free?

Yes. It costs nothing, needs no account and has no limits. It runs in your browser, so we have no server cost to pass on.

Does my text leave my device?

No. Your browser reads the markup and writes the result. Nothing reaches this site, and we keep nothing.

Which BBCode tags does it know?

Bold, italic, underline, strike, subscript, superscript, url, email, img, quote, code, list, size, color, align tags, headings and hr.

How does it write a list?

Each star starts an item. A plain list becomes a bulleted list, and a list with an equals sign becomes a numbered list.

What happens to a quote with an author?

The tool puts the author in a cite tag at the top of a blockquote.

Are links checked?

Yes. Only web and mail addresses pass. The tool drops a javascript link, and its text stays.

Why does the preview show a label for images?

The preview never loads files from other sites. So an image shows as a small label.

Can it convert HTML to BBCode?

Yes. Pick HTML as the input and BBCode as the output. The tool drops tags with no BBCode word, and their text stays.

What is Pug?

Pug is a short way to write HTML. It uses indents instead of closing tags. People once called it Jade.

Can it convert HTML to Pug?

Yes. It writes tags, ids, classes and attributes, with text on its own lines.

Can it convert Pug to HTML?

Yes, for the markup part of Pug. It reads tags, ids, classes, attributes, text, comments and text blocks.

What does it skip in Pug?

Loops, conditions, mixins, includes and code lines. The notes tell you how many lines it skipped.

Does it run scripts?

No. The tool only reads the markup as text. It runs nothing.

Can I convert BBCode to Pug?

Yes. The tool goes through HTML on the way, so every pair of formats works.

Does it keep line breaks?

Yes. A new line in BBCode becomes a br tag in HTML.

Can I open a file?

Yes. Use Open a file. The tool picks the input format from the file name.

How big a file can I use?

A few megabytes. Very large posts may read slowly on a phone.

Can I nest tags?

Yes. Close the inner tag before the outer one. So a bold link inside a quote works as you expect.

What happens to a tag the tool does not know?

It stays in your text as it is. So a custom tag from your own forum never disappears.

Is BBCode the same on every forum?

No. Each board supports its own set of tags. The tool covers the common ones, so test one post on your board first.

Does it work on a phone?

Yes. The panels stack and the boxes scroll. So a phone works, but for long markup, a keyboard is still easier.

More free tools

Handy Companions For Web Text

Converting is one step. These three tools handle the steps around it.

Ready To Convert Some Markup?

Paste your text, pick two formats, and copy the result. The converter is free, needs no account, and keeps every byte on your device.