Markdown live preview
Type Markdown on the left, see it rendered on the right. GitHub-style tables, task lists and code blocks included.
This tool runs in your browser. We never send what you type or paste to a server.
Markdown cheat sheet
# Heading | Heading (## for smaller) |
**bold** *italic* | bold italic |
[text](https://…) | Link |
 | Image |
- item / 1. item | Bulleted / numbered list |
- [ ] task | Task list item (GitHub) |
`code` | Inline code |
```js … ``` | Code block |
> quote | Blockquote |
| a | b | | Table (GitHub) |
Library
Rendering uses the open-source marked library, and the preview is sanitised with DOMPurify.
Quick reference
# Heading ## Smaller heading
**bold** *italic* `code`
[link](https://example.com)
- list item 1. numbered item
> quote --- (horizontal rule)
GitHub-style tables and task lists (- [x] done) are supported.
Line breaks and paragraphs
The most common surprise: a single line break inside a paragraph is not a line break in the output. Markdown joins the lines with a space, which lets you wrap long lines in your editor. To control breaks:
First line
still the same paragraph
A blank line starts a new paragraph.
End a line with a backslash\
to force a line break (or with two spaces).
GitHub renders single line breaks as breaks in issues and comments but not in README files, so text that looks right in a comment can run together in a README. This preview follows the README behaviour.
Rules that trip people up
- Headings need a space:
#Titleis plain text; write# Title. - Four spaces of indentation make a code block. Indented text pasted from an email or a nested list item that is indented too far turns into code. Fenced blocks with
```are safer. - Underscores inside words are literal:
snake_case_namestays as it is, but*inside a word still makes italics. Escape literal characters with a backslash:\*,\_,\#. - Pipes in table cells must be escaped as
\|, or they start a new column. Every row needs the header separator line (| --- | --- |) after the first row. - Numbered lists use the first number as the start and ignore the rest, so
1. 1. 1.renders as 1, 2, 3. A list that starts at another number, such as3., cannot interrupt a paragraph without a blank line before it. - Heading links: GitHub gives every heading an
idso[Install](#install)jumps to it. This preview, like plain marked, does not add heading ids, so such links do not move in the preview or in the copied HTML.
The rules come from CommonMark and the GitHub Flavored Markdown spec, which adds tables, task lists, strikethrough and automatic links.
What Copy HTML gives you
The copied HTML is exactly what the preview shows after sanitising: raw HTML in your Markdown is kept where it is safe (<details>, <kbd>, <sup>), while scripts, event handlers, style attributes and form elements are removed. Task-list checkboxes become the characters ☑ and ☐. There is no stylesheet, so paste it into a page that has its own CSS for headings, tables and code.
Converting Markdown outside the browser
These need a tool installed and were not run on our test machine; they follow each project's documentation.
# Pandoc, reading GitHub Flavored Markdown
pandoc -f gfm README.md -o README.html
# marked's own command-line tool (Node.js)
npx marked -i README.md -o README.html
# Python-Markdown (pip install markdown), writes to standard output
python -m markdown README.md > README.html
Each renderer has its own extensions, so a document that uses tables, footnotes or heading anchors can render slightly differently in each. Preview with the renderer your readers will see.
Questions
Is my text saved?
It's kept in your browser so it's still there if you refresh. It's never uploaded.
Does it support GitHub Flavored Markdown?
Yes: tables, task lists, strikethrough and fenced code blocks.
Are images in my Markdown loaded?
Images from other websites are shown as a link instead of being loaded, so pasting a document does not make your browser contact servers you did not choose.
Why is my text all on one line?
Single line breaks inside a paragraph are joined with a space, as Markdown intends. Leave a blank line between paragraphs, or end a line with a backslash or two spaces to force a line break inside one.
Can I use HTML inside Markdown?
Yes. Block elements such as <details> and <table>, and inline ones such as <kbd> or <sub>, are rendered. Markdown inside an HTML block is only processed if there is a blank line between the HTML tag and the Markdown. Scripts, styles and forms are removed for safety.
How do I add a footnote or a table of contents?
Neither is part of GitHub Flavored Markdown as implemented here. GitHub itself supports [^1] footnotes and builds a table of contents from headings, and tools like Pandoc support both, but in this preview footnote markers stay as plain text.