User Rating 0.0
Total Usage 0 times
0 characters
0 characters · 0 tags removed
Is this tool helpful?

Your feedback helps us improve.

About

BBCode (Bulletin Board Code) is a lightweight markup language used across forums, message boards, and legacy CMS platforms. When migrating content, extracting quotes, or preparing text for systems that reject markup, manual tag removal introduces errors. Missed closing tags, malformed nesting like [b][i]text[/b][/i], and attribute-bearing tags such as [url=...] or [color=#hex] make simple find-and-replace insufficient. This converter applies iterative regex passes to strip all recognized BBCode tags while preserving the human-readable content and structural line breaks.

The parser handles 30+ standard BBCode tag families including nested constructs. It normalizes whitespace artifacts left by removed tags without collapsing intentional paragraph breaks. Note: this tool approximates visual formatting loss. Content inside [img] tags retains the URL as text. Content inside [url=link]label[/url] preserves the label and appends the link in parentheses for reference retention.

bbcode plain text converter bbcode stripper text formatting bbcode parser markup remover

Formulas

The conversion algorithm applies a deterministic sequence of regex-based transformations. Each BBCode tag family is matched by a pattern and replaced with its content extraction rule.

parse(input) output

Step 1: input replaceAttributed(input) - Process tags with attributes: [tag=attr]content[/tag] contextual extraction

Step 2: result replaceSimple(result) - Process simple tags: [tag]content[/tag] content

Step 3: result replaceSelfClosing(result) - Process self-closing: [hr] ---, [*]

Step 4: iterate Steps 13 until no tags remain (max 10 passes for nested structures)

Step 5: result normalize(result) - Collapse > 2 consecutive newlines, trim leading/trailing whitespace per line

where input = raw BBCode string, output = plain text with structural whitespace preserved. The regex pattern for attributed tags follows: \[tag=([^\]*)\]([\s\S]*?)\[\/tag\] with case-insensitive matching.

Reference Data

BBCode TagSyntaxPurposeConversion Output
[b][b]text[/b]Bold texttext
[i][i]text[/i]Italic texttext
[u][u]text[/u]Underline texttext
[s][s]text[/s]Strikethroughtext
[url][url]link[/url]Simple hyperlinklink
[url=][url=link]label[/url]Labeled hyperlinklabel (link)
[img][img]src[/img]Embed imagesrc
[quote][quote]text[/quote]Blockquotetext
[quote=][quote=author]text[/quote]Attributed quoteauthor said: text
[code][code]text[/code]Code blocktext
[color][color=#hex]text[/color]Text colortext
[size][size=14]text[/size]Font sizetext
[font][font=Arial]text[/font]Font familytext
[list][list][*]item[/list]Unordered list• item
[list=1][list=1][*]item[/list]Ordered list1. item
[*][*]itemList item• item
[center][center]text[/center]Center aligntext
[right][right]text[/right]Right aligntext
[left][left]text[/left]Left aligntext
[align][align=center]text[/align]Alignmenttext
[indent][indent]text[/indent]Indentation text
[table][table][tr][td]...[/td][/tr][/table]Tablecell content separated
[tr][tr]...[/tr]Table rownewline
[td][td]text[/td]Table celltext (tab-separated)
[th][th]text[/th]Table headertext (tab-separated)
[hr][hr]Horizontal rule---
[spoiler][spoiler]text[/spoiler]Spoiler blocktext
[spoiler=][spoiler=title]text[/spoiler]Titled spoilertitle: text
[email][email]addr[/email]Email linkaddr
[youtube][youtube]id[/youtube]YouTube embedhttps://youtu.be/id
[media][media]url[/media]Media embedurl
[sup][sup]text[/sup]Superscripttext
[sub][sub]text[/sub]Subscripttext

Frequently Asked Questions

The parser runs iterative passes (up to 10 iterations) over the input. Each pass strips the innermost layer of tags. For example, [b][i][u]text[/u][/i][/b] requires 3 passes: first [u] is removed, then [i], then [b]. The iteration cap of 10 prevents infinite loops from malformed input with unmatched tags.
The converter preserves both the label and the URL. The output format is: label (link). For simple [url]link[/url] tags, only the URL text is retained. This ensures no reference data is lost during conversion, which is critical for content migration where hyperlinks carry semantic value.
After all known tags are processed, a final catch-all regex removes any remaining patterns matching [tag]...[/tag] or [tag=...]...[/tag] structure. Self-closing unknown tags like [customtag] without a closing pair are left as-is since they cannot be reliably distinguished from intentional bracket usage in the text.
Removing block-level tags like [quote], [list], and [table] often leaves excessive blank lines. The normalizer collapses sequences of 3 or more newlines down to 2 (preserving paragraph breaks), trims trailing spaces from each line, and removes leading/trailing whitespace from the entire output. Tab characters from table cell separators are preserved.
The converter accepts input up to 500 KB (approximately 500,000 characters). This limit prevents browser tab freezing on extremely large documents. For reference, 500 KB of BBCode-heavy forum content typically represents 50,000-100,000 words of source material. Inputs exceeding this threshold trigger a warning toast.
The converter operates exclusively on BBCode syntax (square bracket notation). HTML tags like or & entities pass through unchanged as literal text in the output. If your source contains mixed BBCode and HTML, run this converter first for BBCode, then use an HTML-to-text tool for the remaining markup.