UBB and HTML Converter
TextEverything runs locally in your browser — nothing is uploaded
Convert forum code — UBB, the `[b]` `[url]` `[img]` dialect used by Discuz! and its relatives — to HTML, or the other way round. Nesting is the part that matters: `[b]bold[i]italic[/i]still bold[/b]` has to produce correctly nested tags, and a converter built from a chain of find-and-replace cannot do it — only a stack knows which `[i]` a given `[/i]` belongs to, so replacement-based tools emit crossing tags that browsers have to guess at. Three more decisions: unrecognised tags are kept as they are (`[hide]` and `[attach]` are per-forum extensions, and dropping them silently deletes the user formatting), `javascript:` links never become clickable `<a>` tags (the output goes onto a forum — that is an XSS entry point), and `<` and `&` in the body are escaped (otherwise "1 < 2" becomes a malformed tag that skews everything after it).
Features
- Inline tags: bold, italic, underline, strikethrough, colour, size, font and alignment
- Both link forms ([url]address[/url] and [url=address]text[/url]), plus email and images
- Quotes (including [quote=name] attribution), code blocks, and ordered and unordered lists
- Nesting closed in the correct order — what a find-and-replace converter cannot do
- Unclosed tags are closed at the end, and stray closing tags are treated as plain text
- Tag names are case-insensitive: [B] is the same as [b]
- Sizes map through the Discuz 1–7 scale rather than becoming font-size: 7px
- Square brackets inside a [code] block are left alone — that is the code itself
- Unrecognised tags survive untouched, so the user layout does not vanish
- javascript: links degrade to plain text instead of producing a clickable <a>
- The HTML → UBB direction covers paragraphs, lists, quotes, code blocks and inline formatting
- Everything runs locally in the browser; your content is never uploaded
How to use
- Paste the forum code or the HTML
- The direction usually needs no choosing — a leading < is read as HTML
- Turn off the line-break option if you need to
- Copy the result
FAQ
- Why does nesting need a stack?
- Because which `[i]` a given `[/i]` closes is only knowable from the full tag sequence. A converter that runs find-and-replace step by step turns `[b]bold[i]italic[/i]still bold[/b]` into crossing tags (`<strong>bold<em>italic</strong>still bold</em>`), leaving the browser to guess how to repair it. That kind of error raises nothing at all — the page simply looks wrong. So this tool scans once with a stack, pushing and popping, and closes whatever is still open at the end.
- What happens to tags it does not recognise?
- They are kept exactly as they are — not converted, not removed. `[hide]` (reply to view), `[attach]` (attachments) and `[media]` (video) are per-forum extensions with no equivalent outside Discuz, and the tool has no way to know what they should become. Keeping them means the user can see at a glance that something was not converted; deleting them hands back a post with pieces missing, which nothing on screen reveals.
- Why did some links not become links?
- Because their scheme is `javascript:`, `data:` or similar. The output is going onto a forum or blog, where a clickable `javascript:` link is an XSS entry point. This tool only lets through http, https, ftp, mailto, tel and similar, keeping the text and emitting no `<a>` for anything else.
- How many pixels is [size=5]?
- Discuz sizes are a 1–7 scale, not pixel values; treating the number as pixels gives `font-size: 7px`, which is unreadable. These are mapped through the values the Discuz templates actually use: 1→12px, 3→16px (the default), 5→24px, 7→48px. An unrecognised step falls back to 16px.
- Should line breaks become br?
- The forum convention is that a line break is a line break, so that is the default. Some sites already render with `white-space: pre-wrap`, though, and there an extra `<br>` doubles every blank line. If the spacing looks too wide after pasting, turn the option off.
- Is my content uploaded?
- No. The conversion happens entirely in browser memory; the page makes no requests and works offline.
Related tools
HTML Entities
EncodingTurn < > & and quotes into HTML entities and decode them back in a single pass, so &lt; becomes <, not an angle bracket. Runs in your browser.
HTML Formatter
FormatFormat HTML online by tag level, keeping text and inline tags on one line and script or pre content untouched. Runs locally, with nothing uploaded.
Markdown Preview
TextWrite Markdown on the left, see it rendered on the right — heading anchors, a table of contents, highlighted code blocks. Pasted HTML stays text.
Text Cleaner
TextClean up a column pasted out of a log or spreadsheet: deduplicate, sort, drop blank lines, trim whitespace and strip line numbers, all in your browser.
Text Diff
TextCompare two blocks of text online and highlight added, removed and unchanged lines, so only the lines that changed are marked. Runs in your browser.
Word Counter
TextCount Chinese characters and English words separately, alongside characters, lines, real UTF-8 bytes, reading and speaking time, and SMS segment counts.