How to convert Markdown to HTML
- Paste your Markdown into the box above.
- Tick Add id attributes to headings if you want anchor links.
- Read the HTML that appears right away.
- Check the output for any part you plan to style.
- Copy the HTML or download it.
What this Markdown to HTML converter supports
- Headings from h1 to h6 with optional ids for anchor links.
- Bold and italic text plus strikethrough and inline code.
- Links and images with optional titles.
- Ordered lists, bullet lists and GitHub style task lists.
- Fenced code blocks with a language class and escaped contents.
- Quotes, horizontal rules and pipe tables with a header row.
Why Markdown became the default
Markdown solved a real problem. People wanted formatted text without a toolbar. An asterisk on each side of a word beats selecting it and clicking bold.
The key benefit is simple. The source stays readable even if nothing ever renders it. That explains why Markdown took over docs and README files. Note apps, static site tools and chat apps use it too.
There is one catch. Browsers do not understand Markdown. A converter must turn the asterisks into <strong> tags first. This converter does that job.
Where people use converted HTML
- Paste docs into a CMS that accepts HTML but not Markdown.
- Build an email template from Markdown notes.
- Publish a README as a web page.
- Move content between platforms with different editors.
- Create a static page without a site generator.
Why the Markdown to HTML tool escapes raw HTML
Most Markdown tools pass raw HTML straight through. The original spec allowed it. That is handy. It is also how a Markdown field turns into a cross site scripting hole. A user writes a script tag. The tool passes it through. The page runs it.
This converter escapes raw HTML instead. A <script> tag in your source shows up as visible text. It never runs. So you can paste the output anywhere without a separate cleanup step. Need real HTML mixed in? Add it after conversion where you can see exactly what goes in.
Which flavor of Markdown?
No single Markdown exists. The 2004 original left many cases vague. CommonMark tightened them. GitHub added tables, task lists and strikethrough on top.
| Feature | Supported here |
|---|---|
| Headings, bold, italic, links | Yes |
| Tables and task lists | Yes |
| Fenced code blocks | Yes |
| Nested lists | One level only |
| Footnotes and definition lists | No |
| Reference style links | No |
| Inline HTML | Escaped |
This covers what most README files, notes and articles use. Does your document rely on the missing features? A full Markdown library is the better route then.
The HTML it produces
The output is plain semantic markup. It has no classes, no wrapper divs and no framework rules. That makes it easy to style with your own CSS. Code blocks carry a language class when the fence names a language. Syntax highlighters look for exactly that class.
The ids on headings are optional. Turn them on to link straight to a section with a hash in the URL. The tool builds each id from the heading text.
Common Markdown to HTML problems
My HTML shows as text
That is the safety feature at work. Add raw HTML after you convert.
My nested list came out flat
The tool supports one level of nesting. Flatten deeper lists or use a full library.
A table did not render
Check for a header row and a separator line of dashes under it.
A quick Markdown to HTML example
Type ## Packing list on one line. Under it add - [x] Passport and - [ ] Charger. The tool returns an h2 heading and a list with two checkboxes. The first box shows as ticked. Paste that HTML into your CMS and it looks right at once. Add your own CSS to style the boxes.
Tips for clean Markdown
- Leave a blank line between paragraphs and lists.
- Use one heading level at a time without skips.
- Name the language after the opening code fence.
Who uses a Markdown to HTML converter?
Developers publish docs. Bloggers move posts into a CMS. Marketers build emails from notes. Students turn assignments into web pages.
Your text stays private
The conversion runs in your browser. Drafts never leave your device. Want to tidy the HTML output? Use the HTML formatter. Need to show code as text on a page? Try the HTML encoder decoder. Want to check length first? The word counter helps.