Convert BBCode to HTML
This BBCode to HTML converter turns a practical set of forum-style formatting tags into predictable HTML.
Run — free
Paste text containing bold, italic, underline, URL, quote, or list markup and receive an HTML string that is ready for controlled use in a page or publishing workflow. Recognized tags may be nested, ordinary HTML characters are escaped, and malformed nesting is reported instead of silently producing broken markup. The conversion is deterministic, requires no network access, and returns the same result for the same input every time.
Convert the supported BBCode tags
The converter recognizes six familiar BBCode families: <code>[b]</code>, <code>[i]</code>, <code>[u]</code>, <code>[url]</code>, <code>[quote]</code>, and <code>[list]</code>. Bold becomes <code><strong></code>, italics become <code><em></code>, underline becomes <code><u></code>, quotations become <code><blockquote></code>, and lists become unordered HTML lists with list items. A link can use either <code>[url=https://example.com]label[/url]</code> or <code>[url]https://example.com[/url]</code>. List entries begin with <code>[*]</code> inside a list. Tags can be nested when they close in reverse order, so bold text can contain italics or a link label can contain ordinary characters. Tags outside this supported set are preserved as escaped text rather than interpreted as HTML. That narrow contract makes the result easy to reason about and avoids pretending to support the many incompatible BBCode extensions used by different forum packages. If a source relies on custom color, size, image, table, or media tags, handle those separately before or after this conversion with rules appropriate to that source.
Understand validation and safe output
Recognized BBCode must be structurally balanced. Every opening formatting tag needs the matching closing tag, nested tags must close in the opposite order from which they opened, and list item markers must occur directly within a list. A malformed sequence returns an invalid-input error instead of a partial document. This matters in automated publishing because silently repaired markup can move emphasis, links, or quoted material across boundaries the author did not intend. Plain text is HTML-escaped during rendering, including angle brackets and ampersands, while link destinations are escaped for attribute use. Explicit URL schemes are limited to HTTP, HTTPS, and mailto; fragment links and relative destinations are also accepted. This scheme check prevents a BBCode link from becoming an obvious script URL, but the output should still pass through the security and content policy used by the application that embeds it. The converter is a syntax transformer, not a complete trust boundary or a replacement for a site-specific HTML sanitizer, permission system, or moderation process.
Use the result in a publishing workflow
Send one <code>text</code> value and read the converted markup from the returned <code>html</code> field. This simple shape works well in migration scripts, forum exports, comment pipelines, knowledge-base imports, and test fixtures. Before converting a large archive, sample records from the actual source platform because BBCode dialects differ: some use numbered-list arguments, special quote attributions, or proprietary media tags that are intentionally outside this capability. Keep the original BBCode alongside the converted result until the migration has been reviewed, making it possible to adjust source-specific preprocessing without losing information. In an interactive editor, surface an unbalanced-tag error near the author rather than discarding their formatting. In a batch import, record the failing item and continue according to your own retry policy. Conversion via the API costs $0.002 per item, while the deterministic implementation makes repeated runs stable. Because no network, clock, randomness, or external service participates, the same accepted input produces byte-for-byte equivalent HTML across runs.
What you can do with it
Migrate forum posts
Convert supported formatting in exported forum messages before importing the content into an HTML-based publishing system.
Preview legacy comments
Render a predictable HTML preview for comments stored with common BBCode while reporting malformed nesting to the editor.
Normalize knowledge-base content
Transform bold text, links, quotations, and bullet lists into a consistent HTML subset during a documentation migration.
FAQ
Which BBCode tags are supported?
The supported tags are b, i, u, url, quote, and list. List entries use [*]. Other tags remain escaped text.
What happens when tags are unbalanced?
The request fails with an invalid-input error that identifies the unbalanced or incorrectly nested tag.
Can I provide a label for a link?
Yes. Use [url=https://example.com]label[/url]. You can also place the destination itself between [url] and [/url].
Does this sanitize every possible HTML risk?
No. Text and attributes are escaped and unsafe explicit URL schemes are rejected, but applications should still apply their own content security policy and sanitizer when required.
How much does a conversion cost?
Each API request costs $0.002 per item.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/text/bbcode-to-html \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"[b]Important[/b]: visit [url=https://example.com]our site[/url]."}'const res = await fetch("https://api.kit.forhosting.com/text/bbcode-to-html", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "[b]Important[/b]: visit [url=https://example.com]our site[/url]."
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/text/bbcode-to-html",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "[b]Important[/b]: visit [url=https://example.com]our site[/url]."
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/text/bbcode-to-html", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"[b]Important[/b]: visit [url=https://example.com]our site[/url]."}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"[b]Important[/b]: visit [url=https://example.com]our site[/url]."}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/text/bbcode-to-html", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "[b]Important[/b]: visit [url=https://example.com]our site[/url]."
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "text.bbcode_to_html",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_chars | 200000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |