Markdown to HTML

Convert Markdown into clean, safe HTML.

Code Formatters Free, no sign-up Runs in your browser

Markdown to HTML tool

About the Markdown to HTML

Markdown to HTML converts the shorthand you write into the markup a browser renders. It covers what people actually use: headings, bold and italic, links and images, ordered and unordered lists including nesting, blockquotes, inline code and fenced code blocks, horizontal rules, and tables with alignment.

A live preview shows the rendered result beside the HTML, so you can check a document before publishing it. The HTML output is indented and readable rather than being a single line, which matters when you are pasting it into a template.

By default, any raw HTML in your Markdown is escaped rather than passed through. That is the safe choice when the Markdown came from someone else, because unescaped Markdown is a direct route to a cross-site scripting hole. You can allow raw HTML when the source is your own, and the tool says plainly which mode you are in.

How to use the Markdown to HTML

  1. Paste your MarkdownA README, a blog post or any document.
  2. Watch the previewThe rendered result appears beside the HTML as you type.
  3. Choose how to treat raw HTMLEscaped by default, which is the safe setting for untrusted input.
  4. Copy the HTMLIndented and ready to paste into a template.

Features

  • Headings, emphasis, links, images and lists
  • Nested lists and task lists
  • Fenced and indented code blocks
  • Tables with column alignment
  • Blockquotes and horizontal rules
  • Raw HTML escaped by default, with an opt-in to allow it
  • Live preview beside the output
  • Copy or download the HTML

Who uses this tool

The markdown to html is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:

  • Publishing a README as a web page
  • Converting notes into HTML for a CMS
  • Previewing a document before committing it
  • Turning Markdown documentation into static pages
  • Checking how a table or code block will render

Frequently asked questions

Which Markdown flavour is this?

Standard Markdown plus the widely adopted extensions: tables, fenced code blocks, task lists and strikethrough. Platform-specific syntax such as footnotes or admonitions is not included.

Why is raw HTML escaped by default?

Because Markdown from an untrusted source containing a script tag becomes a cross-site scripting vulnerability the moment you render it. Escaping by default means the safe behaviour is the one you get without thinking about it.

Are code blocks syntax highlighted?

The language is written onto the code element as a class, which is what highlighting libraries read. The highlighting itself is done by your site's chosen library, not here.

How are tables aligned?

Colons in the separator row set the alignment, which becomes a style attribute on each cell. Left, right and centre all work.

Does it handle nested lists?

Yes, by indentation, with ordered and unordered lists nesting inside each other. Mixed indentation of tabs and spaces is the usual cause of a list that does not nest as expected.

Is my document uploaded?

No. Conversion runs in your browser, so drafts stay on your device.

If the markdown to html is not quite what you need, these other free tools solve closely related problems.

HTML to Markdown

Convert HTML into Markdown, keeping headings, lists, links and tables.

Code Formatters Use tool

HTML Formatter

Pretty-print HTML with consistent indentation, or collapse it back down.

Code Formatters Use tool

Live HTML Editor

A three-pane editor with a live preview that updates as you type.

Developer Tools Use tool

Text Cleaner

Tidy messy pasted text: extra spaces, empty lines, breaks and special characters.

Text Tools Use tool

HTML Encoder & Decoder

Escape angle brackets and quotes to HTML entities, or decode them back.

Encoding & Conversion Use tool