HTML / UBB Converter

HTML Input

Output

UBB / Encoded HTML Input

Decoded Output

About HTML & UBB Encoding

HTML Entities

HTML entities represent special characters like < > & " that have meaning in HTML. Encoding these characters prevents code injection, XSS attacks, and ensures proper display in web browsers.

UBB Code

UBB (Ultimate Bulletin Board) code is a lightweight markup language used in forums and message boards. It uses [tag] syntax instead of <tag> for formatting text, links, and images safely.

Security Benefits

Always encode user input before displaying as HTML to prevent Cross-Site Scripting (XSS) attacks. This tool helps sanitize content by converting potentially dangerous characters to safe entities.

HTML/UBB Conversion Reference

Text Formatting

<b>[b] Bold
<i>[i] Italic
<u>[u] Underline
<s>[s] Strikethrough

Links & Images

<a href="url">[url=]
<img src="url">[img]
<a href="mailto:">[email]

Common HTML Entities

&lt; = < (less than)
&gt; = > (greater than)
&amp; = & (ampersand)
&quot; = " (quote)
&nbsp; = non-breaking space

HTML/UBB FAQ

What is XSS and how does HTML encoding prevent it?

XSS (Cross-Site Scripting) is a security vulnerability where attackers inject malicious scripts into web pages. By encoding HTML entities, characters like < and > are converted to &lt; and &gt;, preventing browsers from interpreting them as HTML tags. This stops injected scripts from executing.

When should I use UBB code instead of HTML?

UBB code is commonly used in forums, comment systems, and user-generated content areas where allowing raw HTML would be a security risk. UBB provides safe formatting options while preventing malicious code injection. Many forum platforms like phpBB, vBulletin, and Discourse support UBB/BBCode.

What's the difference between HTML encoding and URL encoding?

HTML encoding converts characters to HTML entities (e.g., < to &lt;) for safe display in web pages. URL encoding converts characters to percent-encoded format (e.g., space to %20) for safe transmission in URLs. They serve different purposes and use different encoding schemes.

Are there different versions of BBCode/UBB?

Yes, different forum platforms implement slightly different BBCode variants. Common tags like [b], [i], [url], and [img] are widely supported, but advanced features may vary. Some platforms support [code], [quote], [color], [size], and custom tags. Always check your target platform's documentation.