Page index: Source version: Markbridge 0.4.3. These docs are built from the repository and may include unreleased changes. Source page: https://markbridge.dev/ # Your markup, in Markdown. > Convert BBCode, HTML, MediaWiki, and s9e TextFormatter XML with one Ruby library. Inspect the content and choose how it renders. ## Start with a conversion ```ruby require "markbridge/bbcode" result = Markbridge.bbcode_to_markdown( "[b]Hello[/b] [url=https://example.com]world[/url]!" ) result.markdown # => "**Hello** [world](https://example.com)!" ``` The shipped renderer produces **Discourse-flavored Markdown**. The parsers and AST are independent of the renderer, so you can use the same parsed content for your own output format. ## Choose your input format [BBCode](/format-guides/bbcode/)Convert bracket tags for formatting, quotes, lists, tables, and attachments. [HTML](/format-guides/html/)Convert HTML strings or work directly with a Nokogiri document. [MediaWiki](/format-guides/mediawiki/)Convert wikitext headings, links, lists, tables, and code. [s9e TextFormatter](/format-guides/textformatter/)Read stored XML from phpBB and other TextFormatter applications. ## Keep control of the output Review your content Read the Markdown, unknown tags, and diagnostics from one result. Use them to find content that needs attention. [Understand result objects](/concepts/result-objects/). Use your own rules Add a parser handler, edit the AST, or customize a renderer tag. Reuse your configuration across conversions. [Customize Markbridge](/customization/). ## From markup to Markdown 1. **Parse your input.** Each parser builds the same kind of AST. 2. **Inspect or edit the AST.** Your code can change nodes before normalization prepares them for Markdown. 3. **Render the result.** Use the Discourse renderer or write your own renderer for the shared AST. Read the [architecture guide](/concepts/architecture/) for the details. ## Migrating to Discourse You can convert post bodies, track unknown tags, and resolve uploads, users, and internal links in your own code. The migration guide explains how these parts work together. [Plan your forum migration](/migrating/overview/)Convert posts, review the results, and handle references to your source data.