Writing and previewing Markdown
Markdown is a way to format text with plain characters: a # starts a heading, **double asterisks** make bold text and a dash starts a list item. John Gruber created it in 2004 so that formatted writing would still be readable as plain text. Today it is the default on GitHub, GitLab, Reddit, Discord, Notion, Obsidian and most documentation sites.
This previewer renders Markdown as you type, so you can check headings, lists, links, tables and code blocks before you publish. You can copy the resulting HTML or export it as a file.
How to use it
- Type or paste Markdown into the editor.
- Watch the live preview update next to it.
- Use Copy HTML to paste the rendered HTML into a CMS or email template.
- Use Export HTML to save the result as a file.
Example: the most common elements
# Title **bold** and `code` - one - two
<h1>Title</h1> <p><strong>bold</strong> and <code>code</code></p> <ul> <li>one</li> <li>two</li> </ul>
A blank line separates paragraphs. Without it, the lines join into one paragraph.
The syntax you will use most
Headings take one to six # signs. *Single asterisks* or underscores make italics, **double** make bold. Links are written [text](https://example.com) and images . Numbered lists start with 1., bullet lists with - or *. A line starting with > becomes a quote, and three backticks on their own line open and close a code block; add a language name after the opening backticks, like ```js, for syntax highlighting on sites that support it.
Tables, task lists with [ ] and [x], and ~~strikethrough~~ come from GitHub Flavored Markdown, the dialect this previewer follows and the one most platforms support.
Safe HTML output
Markdown allows raw HTML, which also means a pasted document can contain scripts or event handlers. The preview runs every rendered result through DOMPurify, a widely used sanitiser, so dangerous markup is removed before it is shown or exported. Ordinary formatting tags such as <br> or <sub> survive.
Writing tips
Keep one sentence per line in long documents kept under version control: diffs then show exactly which sentence changed, and the rendered output looks the same. Use headings in order, without skipping from # to ###, which helps both screen readers and the automatic tables of contents many sites generate.
Questions
Why does my line break disappear?
A single line break inside a paragraph is treated as a space. Leave a blank line for a new paragraph, or end the line with two spaces for a hard line break.
Will it look the same on GitHub?
Mostly. GitHub adds its own styles and a few extensions such as alerts and mentions, so small differences are normal.
Is my text uploaded?
No. Rendering happens in your browser.