BBCode and HTML Converter
Write or paste a forum post, convert it either way, check the sanitised preview and copy the result, with a tag toolbar and your own tag mappings.
브라우저에서 실행됩니다. 파일은 기기 밖으로 나가지 않습니다. 확인하는 방법 보기
…
사용 방법
- 1Choose a direction
Pick BBCode to HTML or HTML to BBCode.
- 2Add your text
Paste a post or use the toolbar to wrap selected text in tags.
- 3Set options
Choose line breaks, spoiler style and YouTube embedding.
- 4Map extra tags
Add forum-specific tags under Custom tags.
- 5Check the preview
Read the notes for unknown or dropped tags.
- 6Copy
Copy or download the result, or Swap to convert it back.
이 도구 소개
BBCode is still the markup of phpBB, vBulletin, XenForo, SMF, MyBB and countless game and hobby forums, and it is a common storage format in older community software. People need to move content between the two worlds: a blog article that should be posted on a forum, an archive of forum posts that should become web pages, or a forum migration where the new platform expects HTML. Doing it by hand is slow, and naive search-and-replace scripts produce broken nesting and open the door to script injection. This converter parses BBCode into a tree, closes tags in the right order, and writes HTML from a whitelist: bold, italic, underline, strike, sub and superscript, links, email links, images with optional size, quotes with the author, code blocks with a language class, ordered and unordered lists, colours, sizes, fonts, alignment, tables, horizontal rules, spoilers and YouTube links. In the other direction a small HTML parser maps elements back to BBCode and tells you which ones had no equivalent.
Safety
Every link and image address is checked: only http, https, mailto and relative paths are written, so javascript: links become plain text. Colours must be a colour name or a hex code, sizes are kept within a sensible range, and all text is escaped. Script and style elements are removed when converting HTML, and the preview on this page shows only HTML that the converter itself produced. That makes the output suitable for pasting into a CMS, but your own site should still sanitise anything users submit.
Custom tags
Forums often add their own tags, such as [h] for a heading or [mark] for highlighted text. Under Custom tags you map a BBCode tag to an HTML element and, optionally, to an attribute that receives the tag's value. For safety the element must be a text element and the attribute must be one of title, lang, dir, class, cite or datetime. Mappings work in both directions.
Toolbar and preview
In BBCode mode the toolbar wraps the selected text in a tag, which is quicker on a phone than typing brackets. New lines can become br tags or stay as they are, spoilers can be written as details and summary elements, and YouTube tags can become privacy-enhanced embeds or plain links.
Limits
Forum-specific tags that are not listed and not mapped are kept as text and named in the notes. Smilies, attachments, mentions and BBCode that depends on forum settings are not converted. CSS classes and layout from HTML pages are not carried into BBCode, which only knows simple formatting.
풀이 예시
A guild moves 150 posts from its old phpBB forum to a static website. One typical post with a quote by the moderator, a numbered list of three rules, a code block and a red Important label converts to HTML with a blockquote and a cite line, an ol list with three li items, a pre code block with the brackets inside it left untouched, and a span with color red. A [url=javascript:...] link that a spammer once added comes out as plain text. The reverse check, HTML to BBCode, gives back the same post apart from line breaks.
한눈에 보기
- 카테고리: 개발 및 데이터
- 브라우저에서 실행되며 가입도 업로드도 필요 없습니다.
- 입력한 정보는 기기에 머뭅니다.
- 영어로 제공됩니다.
- 콘텐츠 최종 검토일:
- 공식 출처: phpBB BBCode guide and the WHATWG HTML Living Standard
자주 묻는 질문
Which BBCode tags are supported?
b, i, u, s, sub, sup, url, email, img, quote, code, noparse, list with *, color, size, font, center, left, right, justify, table, tr, td, th, hr, spoiler and youtube, plus any custom tags you add.
What happens to tags that are not closed?
An opening tag without a closing tag is written back as plain text, so a stray [b] does not make the rest of the post bold.
Is the HTML output safe to publish?
It contains only whitelisted elements, safe link schemes and checked colours, and text is escaped. Still run your own sanitiser on anything users submit to your site.
How are HTML headings converted to BBCode?
Most forums have no heading tag, so h1 to h6 become bold text inside a size tag. If your forum has a heading tag, map it under Custom tags.
Does code inside [code] get converted?
No. Everything between code tags is kept literally, including brackets, and written as an escaped pre and code block.
Is my text uploaded?
No. The conversion runs in your browser and the current text and options are kept only in local storage on this device.
