Xerobit

Markdown to Rich Text Converter

This markdown to rich text converter turns plain markdown syntax into formatted, readable output directly in your browser. Paste your text to see headings, emphasis, lists, links, tables and fenced code blocks rendered as styled content. Raw HTML in the input is escaped and link addresses are filtered, so nothing unsafe passes through, and no data leaves your device.

Rich Text Preview

<h1>Hello World</h1><p>This is a <strong>markdown to rich text</strong> demo.</p><ul><li>Item one</li><li>Item two</li></ul><blockquote><p>A blockquote with <em>emphasis</em>.</p></blockquote><table><thead><tr><th>Name</th><th>Role</th></tr></thead><tbody><tr><td>Alice</td><td>Dev</td></tr></tbody></table><pre><code class="language-js">console.log('safe');
</code></pre><p><a href="https://xerobit.dev" target="_blank" rel="noopener noreferrer">Visit Xerobit</a></p>

By · Published · How we build and test tools

How to use the markdown to rich text converter

  1. Paste or type your markdown into the text area.
  2. The converter immediately renders it as formatted rich text below.
  3. Copy the rendered output or use it as a visual reference for your document.

Supported Markdown Subset

This markdown to rich text tool implements a practical subset of CommonMark. The following elements are parsed and rendered:

  • Headings: ATX style from # H1 through ###### H6.
  • Emphasis: *italic* and **bold**, including nesting like ***bold italic***.
  • Inline code: backtick-wrapped text such as `code`.
  • Fenced code blocks: triple backticks with optional language tag.
  • Links and images: [text](url) and ![alt](src).
  • Lists: unordered (-, *, +) and ordered (1.).
  • Blockquotes: lines starting with >.
  • Horizontal rules: three or more hyphens, asterisks or underscores on their own line.
  • Tables: pipe-delimited rows with a separator row of hyphens.

Raw HTML tags in the input are not passed through. They are escaped so the output remains safe, and links whose address does not use http, https, mailto, tel, ftp or a relative path lose their target. They are escaped so the output remains safe.

How the Conversion Works

The converter processes your input in three stages. First, the Markdown is parsed into blocks and inline nodes with the CommonMark rules (nested lists, reference links, setext headings and indented code included). This guarantees that any HTML typed in the markdown source appears as literal text rather than executable markup.

Second, each node is written as HTML, escaping every piece of text, attribute value and link address as it is generated. Each block is classified: a line starting with # becomes a heading, a line starting with > joins a blockquote, consecutive lines starting with - or digits form a list, and so on. Fenced code blocks are detected by opening and closing triple backticks and extracted before other block parsing runs.

Third, inline formatting is applied within each block. Patterns like **text** are replaced with <strong>text</strong>. Because everything is escaped while the HTML is generated and unsafe link schemes are removed, the output cannot introduce cross-site scripting vulnerabilities. The result is a string of safe HTML that the browser renders as rich text.

Why Escape HTML in Markdown?

Standard CommonMark allows raw HTML blocks and inline tags to pass through unchanged. While useful for authors who control their entire pipeline, this behaviour is dangerous when rendering untrusted input. A user could inject a <script> tag that executes arbitrary JavaScript.

all angle brackets and ampersands in the source are converted to entities while the HTML is generated, and link addresses that use scripting schemes are dropped. If you need to convert documents where raw HTML must be preserved, consider using a dedicated markdown to html tool instead, which follows standard pass-through rules.

Common Formatting Examples

The table below shows how typical markdown patterns map to rendered output.

Markdown InputRendered Result
# HeadingLarge heading (H1)
**bold**Bold text
*italic*Italic text
`code`Monospaced inline code
[text](url)Clickable hyperlink
- itemBullet point
1. itemNumbered list entry
> quoteIndented blockquote

For stripping all formatting entirely and keeping only the words, a markdown to text converter removes every symbol and tag.

Worked examples

ExampleInputResult
Headings and emphasisMarkdown input: # Heading 1 / ## Heading 2 / Some **bold** and *italic* text with `inline code`.<h1>Heading 1</h1><h2>Heading 2</h2><p>Some <strong>bold</strong> and <em>italic</em> text with <code>inline code</code>.</p>
Lists and linksMarkdown input: - Apples / - Oranges / - Bananas / 1. First / 2. Second / [Example link](https://example.com)<ul><li>Apples</li><li>Oranges</li><li>Bananas</li></ul><ol><li>First</li><li>Second</li></ol><p><a href="https://example.com" target="_blank" rel="noopener noreferrer">Example link</a></p>
Table and code blockMarkdown input: | Col A | Col B | / | --- | --- | / | 1 | 2 | / ```python / print('hello') / ```<table><thead><tr><th>Col A</th><th>Col B</th></tr></thead><tbody><tr><td>1</td><td>2</td></tr></tbody></table><pre><code class="language-python">print('hello') / </code></pre>
Blockquote and horizontal ruleMarkdown input: > This is a quote. / > It spans two lines. / --- / After the rule.<blockquote><p>This is a quote. / It spans two lines.</p></blockquote><hr><p>After the rule.</p>

FAQ

What is a markdown to rich text converter?

It is a tool that reads plain text written in markdown syntax and produces formatted output with headings, bold, italics, lists, links and other styled elements. You see the final appearance rather than the raw symbols.

Does this tool support all markdown features?

It supports a practical subset: headings, emphasis, inline code, fenced code blocks, links, images, ordered and unordered lists, blockquotes, horizontal rules and simple tables. Footnotes and definition lists are not supported; nested lists, quotes and tables are.

Is my markdown sent to a server?

No. The conversion happens entirely in your browser using JavaScript. Nothing you paste is uploaded anywhere.

Can I paste HTML inside the markdown?

You can paste it, but it will not render as HTML. All tags are escaped to prevent security issues, so they appear as literal text in the output.

How do I create a table in this converter?

Use pipe characters to separate columns and a row of hyphens for the header separator. For example: | A | B | on the first line, | - | - | on the second, and | 1 | 2 | on the third.

What is the difference between this and a markdown to HTML tool?

A markdown to html tool outputs raw HTML source code for you to embed in a page. This converter renders the result visually as rich text so you can read it immediately.