How to use the converter
- Type in the Markdown box, paste text, or press Open file to load a
.mdfile (it is read by your browser, not uploaded). The example shows most of the supported syntax. - Watch the Preview update as you type. Switch to HTML to see the code.
- Press Copy HTML to paste it into a CMS, email template or web page, or Download .html for a complete page you can open in any browser.
Supported Markdown
Markdown is a way of writing formatted text with plain characters, created by John Gruber in 2004. Today most tools follow CommonMark, a precise specification of the original idea, and many add the GitHub Flavored Markdown (GFM) extensions for tables, strikethrough and task lists. This converter handles:
| Element | Markdown | HTML |
|---|---|---|
| Heading | # Title … ###### Small | <h1> to <h6> |
| Heading (underlined) | Title then === or --- | <h1>, <h2> |
| Bold | **bold** or __bold__ | <strong> |
| Italic | *italic* or _italic_ | <em> |
| Strikethrough | ~~gone~~ | <del> |
| Link | [text](https://example.com "title") | <a href> |
| Reference link | [text][id] and [id]: https://… | <a href> |
| Image |  | <img> |
| Inline code | `code` | <code> |
| Code block | ``` or ~~~ fences, or 4-space indent | <pre><code> |
| Bullet list | - item (or * or +) | <ul><li> |
| Numbered list | 1. item (or 1) item) | <ol><li> |
| Task list | - [ ] to do / - [x] done | checkbox |
| Quote | > quoted text | <blockquote> |
| Table | | a | b | then |---|:-:| | <table> |
| Horizontal rule | --- or *** or ___ | <hr> |
| Line break | two spaces or \ at line end | <br> |
Use a backslash to show a character that would otherwise be formatting, for example \*not italic\*.
HTML entities such as © are passed through unchanged.
Safety: raw HTML and links
Markdown lets you mix in HTML, which is convenient for your own writing and dangerous for anything someone else wrote: a
pasted <script> tag or an onerror attribute could run code on any page
that shows the result. So by default this converter escapes all raw HTML: it appears in the output as
visible text, never as tags. Link and image addresses are checked too. Links may use http,
https, mailto, tel and
ftp or be relative; images may use http, https or
a relative path. Anything else, including javascript: and data:, is dropped
and only the text is kept.
If you tick Keep raw HTML, HTML tags and blocks are copied into the output as written, which is what most Markdown tools do. The preview is shown in a sandboxed frame that cannot run scripts either way, but the HTML you copy is not cleaned in that mode, so use it only for your own Markdown. Note that images in the preview are loaded by your browser from wherever they are hosted, as on any web page.
Limits (please read)
This is a compact converter written for this page, not a full CommonMark implementation, and it is not checked against the official CommonMark test suite. For everyday documents (notes, READMEs, blog posts, release notes) the output should match what GitHub or a CommonMark library produces. The differences show up in edge cases:
- Emphasis uses simplified rules. Ordinary bold, italic and bold italic work, but unusual mixes such as
*a **b* c**may nest differently from CommonMark. - Lists follow the main indentation rules, and decide between tight and loose (with or without paragraph tags) by blank lines between items. Rare cases, such as a list item starting with a blank line followed by several blocks, can differ.
- Lazy continuation (continuing a quote or list item on a line without the
>or the indent) works for plain paragraph text only. - Tabs count as 4 spaces for indentation. Tabs inside top-level fenced code blocks are kept, but tabs in code nested inside lists or quotes become spaces.
- Not supported: footnotes, definition lists, heading IDs, math, front matter, emoji shortcodes and syntax highlighting (code blocks get a
language-…class so a highlighter on your site can style them). - Raw HTML mode recognizes HTML blocks that start a line and end at a blank line, plus inline tags and comments. It does not handle every HTML block type in the CommonMark spec.
If you need exact CommonMark output for a build pipeline, use a library such as commonmark.js, markdown-it or cmark-gfm. For quick conversions, previews and copying HTML into another tool, this page does the job without installing anything.
Tips
- Leave a blank line between paragraphs, before and after lists, and around code blocks and tables. Most "it didn't format" problems disappear.
- In tables the header row and the dashes row must have the same number of cells. Use
\|for a literal pipe inside a cell. - To show backticks inside inline code, wrap it in more backticks:
`` a `tick` ``. - Pasting into an email or a word processor? Copy from the preview instead of the HTML tab to keep the formatting.
Related tools
Check the length of your text with the character counter, or clean up text pasted from a PDF with remove line breaks. Working on an API? The JSON formatter pretty prints responses. If you write in Markdown every day, our Obsidian review covers a popular notes app built on plain Markdown files.