ForHosting KIT · Text & AI

Convert BBCode to HTML

This BBCode to HTML converter turns a practical set of forum-style formatting tags into predictable HTML.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

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>&lt;strong&gt;</code>, italics become <code>&lt;em&gt;</code>, underline becomes <code>&lt;u&gt;</code>, quotations become <code>&lt;blockquote&gt;</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.

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.

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.

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.

POSThttps://api.kit.forhosting.com/text/bbcode-to-html

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.

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]."}'
{
  "text": "[b]Important[/b]: visit [url=https://example.com]our site[/url]."
}
{
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_chars200000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →