Markdown to HTML Converter

Paste or upload GitHub Flavored Markdown, see a live preview, copy clean semantic HTML, and download a complete HTML file. Conversion stays on your device.

Convert Markdown locally


Accepted: .md, .markdown and .txt · UTF-8 · maximum 5 MiB

Output, safety and styling options

Output

Source and safety

Untrusted content: keep sanitization enabled before previewing or publishing it.

Standalone styling

Themes and custom CSS affect the preview and styled complete documents. They never alter the semantic HTML fragment.

Markdown Input0 characters · 0 words · 1 line

Keyboard: Tab indents selected Markdown lines; Shift + Tab outdents. Ctrl/Cmd + K focuses the editor and Ctrl/Cmd + Enter converts.

Advertisement

How to convert Markdown to HTML

  1. Add Markdown. Paste Markdown into the Markdown Input editor or choose or drop a .md, .markdown or .txt file.
  2. Choose conversion settings. Choose fragment or complete-document output, formatting, styling and the safety options appropriate for the content.
  3. Copy or download HTML. Review the live Preview and HTML Source, then copy the markup or download the selected HTML output.

Supported syntax and output

Markdown featureExampleGenerated HTMLNotes
Headings## Title<h2 id="title">IDs are optional and de-duplicated.
Emphasis / strong / strike*one* **two** ~~three~~<em>, <strong>, <del>Semantic elements; no inline font styles.
Links and images[site](https://example.com)<a>, <img>Reference links and autolinked URLs are supported.
Nested lists- item<ul>, <ol>, <li>Indent child items by at least two spaces.
Tables| A | B |<table>, <thead>, <tbody>GFM alignment markers are supported.
Task lists- [x] Done<input type="checkbox">Rendered checkboxes are disabled.
Blockquotes> Quoted<blockquote>May contain other Markdown blocks.
Fenced code```js<pre><code class="language-js">Adds a language class, not a highlighting framework.

Side-by-side Markdown-to-HTML examples

Heading and link

## Guide
[Read it](https://example.com)
<h2 id="guide">Guide</h2>
<a href="https://example.com">Read it</a>

Image and blockquote

![Map](map.png)
> Local image path
<img src="map.png" alt="Map">
<blockquote>...</blockquote>

Lists and tasks

- Parent
- Child
- [x] Checked
<ul><li>Parent<ul>...</ul>
<input type="checkbox" checked disabled>

Table and code

| Tool | State |
|---|---|
| Build | Ready |

```js
start();
```
<table><thead>...</thead>
<tbody>...</tbody></table>
<pre><code class="language-js">

What “semantic HTML” means here

The fragment maps structure directly: # through ###### become h1 through h6; emphasis becomes em; strong text becomes strong; quotes become blockquote; fenced code becomes pre containing code; and tables use table, thead, tbody, tr, th and td.

The semantic fragment contains no theme styles or framework classes. It can contain optional heading IDs, language-* classes on fenced code, safe-link attributes, table alignment styles and disabled checkbox attributes. Themes and custom CSS are added only to a styled complete document and to the isolated preview.

Choosing output for common publishing tasks

Use caseChoosePractical limitation
README conversionFragment for an existing documentation page; complete document for a shareable browser file.Repository-relative images and links must be adjusted for the destination URL.
WordPress or GhostFragment for a Custom HTML block or HTML editor.The CMS may sanitize tags and attributes again; preview the published result.
Documentation sitesFragment when the site supplies layout; complete document for an independent page.Heading IDs can collide with IDs generated by the documentation framework.
Email templatesUsually a fragment inserted into a tested email template.Email clients have limited CSS support; inline critical styles with a dedicated email tool and test clients.
Static-site contentFragment for a template pipeline; complete document for a directly deployed file.YAML front matter is not interpreted, and relative asset paths remain relative.

Privacy, parser and compatibility

Local conversion

Parser: self-hosted Starlight GFM Parser 1.0.0, pinned on this site and tested against the syntax matrix above on . It implements CommonMark-style Markdown plus GFM tables, task lists, strikethrough and autolinks.

Your input and output never leave the browser. The preview is sandboxed with scripts disabled. However, an unsanitized preview can still request externally referenced images; enabling sanitization blocks those external image requests.

Markdown to HTML FAQ

Does this support GFM tables and task lists?

Yes. The parser supports GFM tables, task lists, strikethrough, autolinked URLs, fenced code blocks with language classes, nested lists and reference links.

What is the difference between an HTML fragment and a complete page?

A fragment contains only the converted semantic elements for insertion into a CMS or existing page. A complete page adds the doctype, head, charset, viewport, title and body so the downloaded file opens directly in a browser.

How are raw HTML and sanitization handled?

Raw HTML is escaped unless Allow raw HTML is enabled. Sanitization is a separate option that removes unsafe elements, event handlers, dangerous URLs and external image requests. Keep sanitization on for untrusted content.

Does the converter add syntax highlighting?

No highlighting library is included. A fenced block with a js language hint produces a language-js class on its code element so a publishing system can apply its own highlighter.

Can I add custom CSS?

Yes. Custom CSS is applied to the preview and can be included in styled complete-document output. It never changes the semantic HTML fragment.

What happens to relative images?

Relative image paths are preserved, but they only work when the final page can resolve those files. With sanitization on, external http and https preview images are blocked to prevent network requests.

Is YAML front matter supported?

YAML front matter is not interpreted as metadata. Remove it before conversion or handle it in your static-site generator.

How are single line breaks handled?

By default, a single soft line break remains part of the same paragraph. Enable Convert soft line breaks to add br elements for single newlines.

What is the file-size limit?

The importer accepts UTF-8 text files up to 5 MiB. Very large documents may convert more slowly on low-power devices because all work happens in the browser.

Which browsers are supported?

The converter requires a modern browser with JavaScript, FileReader, Blob and iframe srcdoc support. Current versions of Chrome, Edge, Firefox and Safari provide these features.

Does the Markdown leave my browser?

No. Input, conversion and downloads stay in your browser. Unsanitized previews can still request externally referenced images, so enable sanitization when privacy matters.

Explore more tools