Markdown to HTML
Markdown (or BBCode) in, clean and safe HTML out — with a live preview.
Paste Markdown or drop a .md file. Nothing is uploaded.
Result
The rendered result appears here.
About the Markdown to HTML
Write or paste Markdown and get the HTML instantly, with a live preview next to the code. The converter follows CommonMark plus the GitHub extensions people expect — tables, strikethrough, task lists, footnotes and automatic links — and adds GitHub-compatible heading IDs, an optional table of contents and syntax highlighting for fenced code blocks (highlight.js, 30+ languages).
Forum posts in BBCode (phpBB, vBulletin, MyBB, SMF style) convert too. The HTML is sanitised with DOMPurify so scripts, event handlers and javascript: links cannot slip through, and the preview is rendered with even stricter rules. Copy the HTML, download it as a fragment or as a complete styled document, or copy the formatted result straight into an email or a Google Doc. Everything runs in your browser.
How to use it
- Choose Markdown or BBCode, then type, paste or open a .md file. Load sample shows what is supported.
- Check the Preview; switch to HTML to see the code.
- Open Options to add a table of contents (put
[[toc]]on its own line where it should go), change heading IDs, highlighting, smart quotes, line breaks or link targets. - Pick HTML fragment to paste into a CMS or template, or Full HTML document for a standalone, styled page.
- Use Copy HTML, Download .html, or Copy formatted to paste rich text into email, Google Docs or Word.
Examples
## Getting started
<h2 id="getting-started">Getting started</h2>
IDs follow GitHub's rules (lower case, punctuation removed, spaces → hyphens; repeats get -1, -2), so links copied from GitHub keep working.
- [x] Write docs - [ ] Ship | Plan | Price | |------|------:| | Pro | ₹499 |
<ul class="contains-task-list"> <li class="task-list-item"><label><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> Write docs</label></li> … <td style="text-align:right">₹499</td>
Each checkbox is wrapped in a <label> with its text, so screen readers announce what the task is.
[b]Hi[/b] [url=https://example.com]link[/url] [quote="Asha"]Thanks![/quote]
<strong>Hi</strong> <a href="https://example.com">link</a> <blockquote> <cite>Asha wrote:</cite><br> Thanks! </blockquote>
Common uses
- Turning a README, changelog or documentation page into HTML for a website or CMS.
- Writing blog posts or newsletters in Markdown and pasting them as formatted text.
- Moving forum content from BBCode to HTML.
- Generating a table of contents with working anchor links for long documents.
- Checking how Markdown will render before committing it.
Supported syntax
- CommonMark: headings, emphasis, lists, links, images, code, blockquotes, horizontal rules, HTML blocks.
- GitHub extensions: tables with alignment,
~~strikethrough~~, task lists- [ ]/- [x](rendered as labelled, read-only checkboxes), footnotes[^1], and bare URLs turned into links. - Table of contents: a line with only
[[toc]](also[toc]or[TOC]) is replaced by a nested list of links to the headings; choose which levels to include, or place it at the top automatically. - Code blocks: write the language name straight after the three opening backticks (for example
js) to highlight the block. Common names and aliases work — js, ts, python, bash, json, html, css, sql, java, c, cpp, csharp, go, rust, php, ruby, kotlin, swift, yaml, diff and more. - BBCode: [b] [i] [u] [s] [url] [email] [img] [quote] [code] [list] [*] [color] [size] [font] [center] [left] [right] [spoiler] [table] [tr] [td] [th] [hr] [sub] [sup] [noparse].
Safe HTML
With Sanitise on (the default), the HTML goes through DOMPurify: <script>, inline event handlers such as onclick, javascript: links and other dangerous markup are removed, while formatting, classes, ids and inline styles stay. The tool lists what it removed.
The on-page preview is stricter still: it never runs scripts, ignores <style> and form elements, re-applies only harmless inline styles (colour, size, alignment), keeps only the class names the converter itself writes, prefixes ids with user-content- (as GitHub does), keeps everything inside the preview box and opens links in a new tab. Images from other sites load in the preview without sending a referrer.
Fragment or full document
An HTML fragment is just the converted content, ready to drop into a page, template or CMS field; style it with your site's CSS (highlighted code uses the standard hljs-* class names, so any highlight.js theme works). A Full HTML document adds <!doctype html>, a title taken from the first heading, and a small readable stylesheet with light and dark modes — open it in any browser or attach it to an email.
Limitations
- GitHub-only features such as alerts (
> [!NOTE]), emoji shortcodes, @mentions, Mermaid diagrams and math are not rendered. - BBCode has many dialects; unknown tags are left as text and listed so you can fix them.
- Syntax highlighting needs the language name after the opening fence; unnamed code blocks stay plain.
- Inputs over 200,000 characters convert when you press Convert instead of while you type; the limit is 2,000,000.
Privacy
Your text is converted, sanitised and highlighted in your browser and is never uploaded or stored by MySmartCoPilot; only your option choices are remembered in this browser. If your Markdown shows images from other websites, the preview loads them from those websites (without sending this page’s address), as any Markdown viewer does.
Frequently asked questions
Is the HTML safe to put on my website?
With Sanitise switched on, scripts, event handlers and javascript: URLs are removed by DOMPurify, a widely used sanitiser. If you turn it off, the HTML keeps whatever raw HTML your Markdown contains — only do that for content you wrote yourself.
How do I add a table of contents?
Put [[toc]] on a line of its own where the list should appear. Under Options choose the heading levels (for example h2–h3), or choose “at the top” to add one even without the marker. Each entry links to the heading's ID.
Will my GitHub anchor links still work?
Yes. Heading IDs are generated with the same rules as GitHub's, including numbering repeated headings (setup, setup-1, …).
How do I paste the result into Gmail, Outlook or Google Docs?
Press Copy formatted. It copies the rendered content as rich text, so the headings, lists, links and tables paste with their formatting. Some browsers ask for permission the first time.
Is my document uploaded?
No. The conversion, sanitising and highlighting all run in your browser; the page works offline once loaded. Images that your Markdown links to are loaded from their own sites when the preview shows them.