Skip to content

Markdown to HTML converter

Markdown to HTML uses our document engine to turn Markdown structure into semantic HTML, with standalone wrapping only when requested.

  • Converted with Document engine · input deleted within 24 h
  • Free: 5 conversions a day · 5 MB each
  • Higher limits →

From real runs

What you get — and what changes

  • Headings Kept

    Markdown headings become h1 through h6 elements.

  • Paragraphs and lists Kept

    Paragraphs, bullets, numbered lists, and blockquotes become semantic HTML elements.

  • Raw HTML Kept

    Raw HTML in the Markdown passes through instead of being escaped.

  • Footnotes Changed

    Markdown footnotes become linked backreferences in the generated HTML.

  • Images Changed

    Image references stay as img src attributes; image files are not bundled into the HTML.

  • Document shell Changed

    Without standalone, output is an HTML fragment. With standalone, our document engine adds html, head, body, and minimal CSS.

  • Code blocks Kept

    Fenced code blocks become pre/code blocks with classes suitable for highlighting.

Sample conversions

Docs page fragment

Input
Markdown docs page with H2 headings, fenced JSON examples, an inline HTML warning box, and two footnotes.
Output
The HTML fragment kept headings, pre/code blocks, and the raw warning div. Footnotes became linked anchors at the bottom of the fragment.

Standalone newsletter

Input
Markdown newsletter with title metadata, images referenced by HTTPS URL, lists, and blockquotes.
Output
Standalone mode added a full HTML document with minimal CSS. Images stayed remote src references, so private URLs would still fail for recipients.

A real Markdown → HTML run

We converted our Markdown sample (472 B) with Document engine on 2026-09-11. It took 28 ms and produced a 4 KB HTML file, 9.6× larger than the input. The engine raised no warnings.

Input · sample.md · 472 B

3 headings, 1 table, 4 list items, 0 code blocks, 0 image references

Headings
3
Tables
1
List items
4
Code blocks
0
Images
0
Lines
13

Output · sample.html · 4 KB

Standalone document with 3 headings, 2 paragraphs, 1 table, 0 links, 0 images, 1 style block

Headings
3
Paragraphs
2
Tables
1
Links
0
Images
0
Standalone document
yes

First lines of the output

html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>sample</title>
  <style>
    html {
      color: #1a1a1a;
      background-color: #fdfdfd;
    }
    body {
      margin: 0 auto;
      max-width: 36em;
      padding-left: 50px;
      padding-right: 50px;
      padding-top: 50px;
…

Options and when to change them

standalone
Use for a complete HTML file with head, body, metadata, and minimal CSS; leave off for CMS fragments.
toc
Use when heading anchors and a generated table of contents should be included in the HTML output.

Do it yourself

pandoc

bash
pandoc in.md -t html -o out.html

This produces a fragment unless you add --standalone.

pandoc standalone

bash
pandoc in.md -t html --standalone --toc -o out.html

Pandoc's default CSS is minimal; bring your own stylesheet for publication design.

Markdown to HTML by API or MCP

The HTTP API and the MCP server run the exact engine this page uses (Document engine); the response carries the same warnings the web converter shows. Check support first with GET /api/v1/pairs?from=md&to=html.

curl
curl -X POST https://filetypeconverters.com/api/v1/convert \
  -H "Authorization: Bearer $FTC_API_KEY" \
  -F "file=@input.md" -F "from=md" -F "to=html" \
  --output output.html
API reference

When this is the wrong conversion

  • If you need a printable fixed-layout file, use Markdown to PDF instead.
  • If raw HTML in the source should be sanitized, run a sanitizer after conversion because our document engine passes it through.
  • If images must be embedded inline, package the HTML separately or use a format that bundles assets.

Markdown to HTML questions

Does raw HTML inside Markdown survive?

Yes. Our document engine passes raw HTML through in this route, so sanitize separately before publishing untrusted Markdown.

What does standalone change?

Standalone wraps the converted body in a full HTML document with metadata and minimal CSS. Without it, you get a fragment.

How are Markdown footnotes represented?

They become linked footnote entries with backreferences so readers can jump between the note and the reference.

Are images copied into the HTML file?

No. Image references remain links in src attributes, so the image files or URLs must remain available.