BBCode To HTML Converter
BBCode, HTML And Pug With A Preview
This BBCode to HTML converter transforms forum markup into pure HTML. It will also produce BBCode and Pug and display a safe preview. Nothing gets uploaded by us.
- 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
The preview appears here.
Ready. Paste your markup and pick the formats.
Run it on a test page before the live one
Keep a copy of your original code and try the result on a test page before you replace the live file. No automatic tool can see every way your site uses its code.
What A BBCode To HTML Converter Does For You
The first thing that you do when using BBCode (the markup used on older forums) is type a tag within square brackets. The system then converts that into either bolded text, a URL or a quote. Some other websites may be using HTML while others are using Pug, so it’s common to have to transfer text between them.
This program performs both functions in a single location. After pasting the HTML/markup into the given space, select which file format you now use, as well as the file format you need. As you enter data, the result is displayed on screen and a preview of the formatted output is available.
It reads BBCode, HTML and Pug. Then it writes the same three. So that makes six pairs, and each one works the same way.
Every conversion step runs inside your own browser, never on a server. So the text you paste stays on your own device. That matters, because posts and templates often hold names and private notes.
BBCode To HTML, Tag By Tag
First, the system will read each tag that is within the brackets. The tags such as bold, italic, underline, and strike will turn into strong, em, u and s. Links will turn into anchors, and quotes will turn into blockquotes with the author’s name in a cite tag.
Also, lists are supported. A star creates a new line item, and an equal sign selects a numbered list. Tags for color and size will be transformed into spans with styles, and the center, left and right tags will work out how the text is aligned.
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
Then, the preview serves as a bb code viewer. It displays the results by rendering each component of the document individually, which prevents anything within the text from being processed. Only a few bb code tags will pass through.

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.
The image displays as a tiny label rather than as a picture. This prevents the browser from downloading images from other websites.
HTML To BBCode
It works in reverse on this page as well. First, paste HTML into the program. Then, it will create BBCode that can be posted in a forum. For example, strong and b tags will be converted to the bold tag; em and i tags will be converted to italic tags; and an anchor tag will be converted to a url tag.
Then the lists, quotes and code blocks maintain their structure. Also, the headers will appear as a bold, larger line. This tool removes tags from the HTML that are not supported by BBCode; but the content of these tags will remain.
The tool does not include the script, style and header sections of a page. You will so get a clean body section to use in your post.
From HTML To Pug And From Pug To HTML
The language Pug, which was previously referred to as Jade, is a short form of writing HTML. Pug removes the angle brackets from HTML and also removes the closing tags. Instead, Pug uses indentation. For example, if you have a div element with an ID and a Class, then that div element would become one single line in Pug (e.g., #order.card).

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.
The tool is also able to read the markup part of Pug. But since the loops, conditions, mixins and includes need the use of the Pug engine, the tool will skip over those specific lines and let you know 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 has to start with http, https or mailto.
So, a harmful value will never appear in your HTML. The program removes the tag and leaves the text.
Line Breaks And Entities
First, when there’s a new line in BBCode it becomes a tag. When there’s a line break directly following a quote, list, or code block, the tool will consume the line break since those types of blocks are always on their own lines.
Special characters are handled (escaped) by the tool. For example, a "less than" symbol will be converted into an HTML entity and so will not accidentally start an HTML tag.
Safe By Design
First, the tool reads your markup as text and does not pass it off to the browser as code. So, a script cannot be executed, and an event listener cannot trigger.
The preview works by 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.
On this page
- The tool
- What A BBCode To HTML Converter Does For You
- Using The BBCode To HTML Converter, Step By Step
- What This Markup Converter Does Differently
- Habits For Moving Markup Between Formats
- Common Markup Mistakes This Tool Prevents
- Common Questions About The BBCode To HTML Converter
- Handy Companions For Web Text
Keep going
Using the BBCode to HTML Converter: A Short Video Guide
This brief video shows each step from start to finish. Choose your language below, and switch on captions if they help.
Using The BBCode To HTML Converter, Step By Step
Four steps take you from one markup to another.
Paste your markup
Paste BBCode, HTML or Pug, open a file, or try the sample.
Pick two formats
Choose the format you have now and the format you want back. Swap the two formats around with one click.
Check the preview
Look at the live preview to see how the result reads.
Copy or save
Copy the result, or save it with the right file type.
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
The work happens on your side, in your own browser. Your text is never visible to us.
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 you close 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.
- Try a few lines first before you convert a long post. Try converting a few lines first. After that, convert the full 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.
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
Lots of converters upload your text to a server. This one never does.
Common Questions About The BBCode To HTML Converter
Does this BBCode to HTML converter cost anything?
Yes. You pay nothing, you need no account, and there’s no cap. Since it works in your browser, there is no server bill for us to charge you.
Is the BBCode I paste kept on 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 recognise?
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.
Are line breaks kept?
Yes. A new line in BBCode becomes a br tag in HTML.
Can I load a file instead of pasting text?
Yes. Use Open a file. The tool picks the input format from the file name.
How large a file will the converter accept?
A few megabytes. Very large posts may read slowly on a phone.
Can I nest tags?
Yes. Shut the inner tag first, and then 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 too, or only on a desktop?
Yes. The panels stack and the boxes scroll. So a phone works, but for long markup, a keyboard is still easier.
Handy Companions For Web Text
Converting is one step. These three tools handle the steps around it.
- Markdown to HTML Converter
Turn Markdown into HTML and back again.
- HTML to JSON Converter
Turn HTML into JSON, XML, CSV and more.
- HTML Entity Encoder and Decoder
Turn special characters into HTML entities, or entities back into characters.
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.