📑 Markdown Preview / HTML
Paste Markdown and see a real-time HTML preview. GitHub-style rendering with code highlighting.
📚 Supported Syntax
🔗 Related Tools
📖 Where people get stuck
Paste Markdown and the HTML renders live, with the converted HTML ready to copy. The main GitHub Flavored Markdown constructs and code highlighting are supported. Everything runs in the browser. There is no single Markdown specification: CommonMark, GFM, Qiita, Zenn, Notion and Slack are all different dialects, so how it looks here does not guarantee how it will look where you paste it.
| Case | What happens | What to do |
|---|---|---|
| Line breaks and lists fall apart at the destination | The dialects differ most in how they treat line breaks. GFM turns a plain newline into a <br>, whereas CommonMark ignores it and joins the lines into one paragraph — the same text becomes three lines in one place and one line in the other. Nested lists depend on whether indentation is two spaces or four, so a nest written with two can flatten out, or be read as a code block instead. Slack, for its part, understands neither headings nor tables. |
Always leave a blank line around blocks. Simply having one before a heading, list, table or code fence removes most of the dialect-to-dialect variation. To separate paragraphs, use a blank line rather than a single newline — every dialect treats that as a paragraph break. Standardising list indentation on four spaces or a tab is the safest choice. When you cannot find the cause of a broken block, suspect a full-width space: one typed at the start of a line while a Japanese input method is active is completely invisible on screen and is not recognised as indentation, which puts it near the top of the list of reasons lists break. |
| HTML tags pass straight through | The Markdown specification permits raw HTML — converters pass <div> and <script> alike through to the output. This page only renders what you typed yourself, so it does not sanitise, but building the same mechanism into a service without understanding this gives you XSS directly. The belief that Markdown is inherently safe is stubbornly common, and a user who writes <img src=x onerror=...> in a comment gets it executed verbatim in the converted HTML. |
If you render Markdown that users wrote, always sanitise the resulting HTML — in that order: DOMPurify.sanitize(marked.parse(input)). Do not rely on the library own sanitize option; the one in marked was deprecated and has since been removed. Getting the order backwards, sanitising and then converting, achieves nothing, because Markdown will happily reconstitute the escaped text. The same processing has to run on the server too — sanitising only in the browser is bypassed the moment someone calls your API directly. |
| The table does not render as a table | Tables are an extension that plain Markdown does not have; GFM added them. So in an environment that does not support them, you get a single paragraph of pipe characters. Even where they are supported the conditions are strict: if the header row and the delimiter row below it (|---|---|) do not have the same number of columns, it is not recognised as a table at all. Some implementations also require at least three hyphens in the delimiter. Without a blank line before it, the block is read as a continuation of the previous paragraph and never becomes a table either. |
Count the columns in the delimiter row first — one off and it will not render. Trailing pipes are optional, but if you are unsure, put a | at the start and end of every row: it lets you count the columns by eye and makes the mistake obvious. More fundamentally, a Markdown table stops being worth writing in Markdown the moment it is no longer readable as plain text. Once you are past five columns, or cells contain long prose, dropping the table for a bulleted list, or writing an HTML <table> directly, generally ends up easier to read. |
Highlighters recognise different names for the same language. js and javascript are usually equivalent, but shell varies across sh, bash, shell and console, and console excludes the prompt character ($) from highlighting, which reads better when you are publishing commands to copy. Omitting the language not only loses the highlighting but also affects how GitHub colours diffs. Finally, a principle for writing Markdown at all: its value is that it reads fine without being converted. If layering bold, italic and headings has left the plain text unreadable under a pile of punctuation, you are using Markdown wrongly. A document that needs that much decoration is a document that should have been written in something else.
📖 How to Use
-
1
Type MarkdownType or paste Markdown on the left; Sample button loads a typical example.
-
2
See live previewGitHub-style HTML renders on the right. Headings, tables, task lists, code blocks all supported.
-
3
Copy as HTMLSwitch to HTML tab and copy to paste into a blog or CMS.
❓ Frequently Asked Questions
Is it GitHub Flavored Markdown?
Can I use raw HTML in Markdown?
Is LaTeX math supported?
Where is my input stored?
🐛 Found a bug or issue with this tool?
Free to use, no signup. Even just the steps to reproduce are helpful. Reports go directly to the operator and help us fix issues.
Thanks for your report!
Your report has been delivered to the operator and will be used to improve the tool.