Markdown Preview
See Markdown source and output side by side, then save as HTML or print to PDF. Nothing you enter is sent to a server.
Loading the tool…
User reviews
No reviews yet. If you’ve used this tool, be the first to leave one.
Markdown Preview: complete guide
Walk through the steps and examples, or jump straight to the topic you need.
At a glance
- Supported syntax
- Headings, emphasis, strikethrough, lists, numbered lists, checkboxes, quotes, tables, code, links and images.
- Safe handling
- HTML and scripts in the document are shown as text instead of being run.
- Link check
- Addresses such as javascript: are not turned into links.
- HTML export
- Makes a fragment with special characters escaped.
- Table of contents
- Built automatically when there are two or more headings.
- Statistics
- Counts of characters, words, lines and headings, and an approximate reading time.
- Size limit
- Up to 200,000 characters and 20,000 lines.
- Where it runs
- The document is not sent to a server and is handled only in this browser.
How to use Markdown Preview
Write markdown on the left
You can type it yourself or paste it from somewhere else. A sample document is there at first so you can see the syntax right away.
See the result on the right
It updates as you type. If there are two or more headings, a table of contents appears at the top so you can see the structure at a glance.
Convert it to HTML
Switch to the HTML tab and you get a fragment you can paste in and use as it is. Special characters are escaped, so nothing breaks.
Copy or save
You can save the source as .md and the result as .html. The copy button also puts it straight onto the clipboard.
What it’s good for
It opens documents from other people safely
If a preview is built by inserting an HTML fragment into the page, any script mixed into the document may run. This tool reads the document as a structure and then draws it directly as screen elements, so tags and scripts in the document appear only as text. Addresses such as javascript: are not turned into links; only the text is left.
It also gives you information about the document
If there are several headings, it builds a table of contents so you can see the structure at a glance, and counts characters, words and lines along with an approximate reading time. When you export to HTML, special characters are escaped, so you get a fragment that doesn't break when pasted as it is.
Worked examples
Table alignment
| Item | Owner | Due |
| --- | :-: | --: |A table with center and right alignment appliedA document with a script mixed in
<script>alert(1)</script><script>alert(1)</script> (shown as text)Two ways to build a preview
Swipe the table sideways to see the rest.
| Method | Script in the document | This tool |
|---|---|---|
| Insert an HTML fragment into the page | Can run | Not used |
| Read as a structure and draw elements | Appears only as text | This method is used |
| Export to HTML | Escaped, so a safe fragment | Used for copying and saving |
When the result isn’t what you expected
Line breaks disappear
This tool keeps line breaks inside a paragraph. If they disappear when you paste elsewhere, that place may split paragraphs only with blank lines.
A table doesn't show as a table
A separator line made of --- must come right under the header row for it to be read as a table. Check whether the separator line is missing.
A link doesn't open when I click it
Dangerous addresses such as javascript: are deliberately not turned into links. Check that the address starts with http.
It says the document is too long
It is over 200,000 characters. Please check it chapter by chapter.
Key terms
- Markdown
- A way of writing document formatting with a few symbols. You can use the easy-to-read source as it is.
- Escape
- Converting characters such as < and & into a safe form in HTML.
- Code block
- A section wrapped in three ``` marks. What is inside is not read as syntax.
- Table of contents
- A list that gathers only the document's headings to show its structure.
Markdown Preview FAQ
What syntax does it support?
It supports headings, bold, italic, strikethrough, lists, numbered lists, checkboxes, quotes, tables, code blocks (with syntax highlighting), links, images, footnotes and math ($…$, $$…$$).
Is my document uploaded to a server?
No. Reading and drawing both happen inside this browser.
Can it align table columns?
Yes. You can put colons in the separator line to set left, center or right alignment, and it applies to both the preview and the exported HTML.
Does it support math?
Yes. A pair of $ like $E=mc^2$ is math inside a sentence, and a line wrapped in $$ becomes a centered math block. Money written as $5 and $10, starting with a digit and separated by spaces, is not read as math. Add a footnote with [^1] and write [^1]: the content at the bottom of the document.
Can I use the HTML it makes as it is?
Yes. It is a fragment with special characters escaped and dangerous addresses filtered out, so you can paste it into a blog or a document tool and use it.
Can I use bold inside a table?
Yes. You can use bold, italic, code and links inside table cells too.