iLoveMD
100% in your browser

Convert Markdown to HTML

Turn Markdown into clean, semantic HTML with a live preview, entirely in your browser. Your text never leaves your device.

  • Always free
  • No uploads
  • No sign-up
  • No tracking

← All conversion tools

Drop a Markdown file here or click to upload .md · .markdown · .txt
No files selected

Markdown Input

HTML Preview

Export Your Results

Markdown to HTML Docs

iLoveMD renders Markdown into clean, semantic HTML using a JavaScript parser bundled with this page. Output is sanitized with DOMPurify, headings are real <h1><h6> tags, tables are GitHub-flavored, and code blocks tagged as mermaid become rendered diagrams automatically. The whole pipeline runs in your browser — your Markdown source never leaves your device.

Supported syntax

Standard CommonMark plus GitHub-flavored tables. The parser handles:

  • Headings (# H1 through ###### H6)
  • Bold (**bold**), italic (*italic*), strikethrough (~~strike~~)
  • Inline code (\`code\`) and fenced code blocks (\`\`\`lang ... \`\`\`)
  • Ordered and unordered lists with arbitrary nesting
  • Tables with column alignment (:-- / :--: / --:)
  • Links ([text](url)), images (![alt](src)), blockquotes (> ...)
  • Horizontal rules (---)
Tip: if your Markdown uses extended syntax like footnotes or YAML frontmatter, the current parser ignores it. CommonMark + tables is the supported feature set.

Mermaid diagrams (new) feature

Markdown containing a fenced code block tagged mermaid renders the diagram in the live preview AND bakes it into the downloaded HTML as a base64 PNG image. Your file opens standalone, offline, with the diagram visible — no runtime dependency on iluvmd.com or the network.

# My doc

\`\`\`mermaid
graph TD
  A[Start] --> B[End]
\`\`\`

The diagrams are rendered using the same engine as our Mermaid Editor — locked to securityLevel: 'strict', with init-directive stripping and a Mermaid-aware SVG sanitizer. See the editor's Docs for the full list of supported diagram types (Flowchart, Sequence, Class, State, ER, Gantt, Pie, Git Graph, Mind Map, User Journey).

Tip: for portability, the embed format is PNG. If you want a vector SVG you can edit downstream, use the standalone Mermaid Editor and choose Export SVG.

What the output looks like

Click Source above the preview to see the raw HTML. Headings render as real <h1><h6> tags, not styled divs — semantically correct for screen readers, search engines, and downstream parsers.

The downloaded .html file is a complete document: <!DOCTYPE html>, language attribute, viewport meta, character set, and a small inline stylesheet that matches the on-page preview. Open it directly in any browser. No external assets, no internet required.

Sanitization

Every HTML string leaving the Markdown parser passes through DOMPurify with a strict configuration: no <svg> root injection, no <style> element, no inline style= attribute, no <iframe>/<object>/<embed>/<form>. That blocks the most common XSS vectors even if the input Markdown smuggles raw HTML.

Every <a> in the output gets target="_blank" rel="noopener noreferrer" automatically — safe to paste into Gmail, Notion, a Google Doc, or anywhere else without the linked page being able to navigate back through window.opener.

Privacy

The Markdown parser, the DOMPurify sanitizer, and the Mermaid renderer all run entirely in your browser. We never see your file. No analytics, no server-side conversion, no third-party CDN fetches at conversion time. Once the page has loaded, the conversion works offline.

How to convert Markdown to HTML

1

Paste or drop your Markdown

Paste your Markdown text into the editor, or drop a .md file onto the upload strip.

2

See the live HTML preview

The HTML renders in your browser as you type. Toggle to Source view to see the raw HTML.

3

Copy or download the HTML

Copy the HTML to your clipboard or download it as a file. Nothing is uploaded.

Frequently asked questions

Does my Markdown get uploaded anywhere?

No. The entire conversion runs in your browser using JavaScript. Your text never leaves your device, and we never see it.

Is the HTML output clean and semantic?

Yes. Output uses semantic tags (h1 to h6, ul, table, pre, and more) and is sanitized with DOMPurify so no unsafe markup slips through.

Can I see the raw HTML source?

Yes. Click the Source toggle above the preview to switch between the rendered preview and the raw HTML you can copy.

Which Markdown features are supported?

Headings, bold and italic, ordered and unordered lists, tables, code blocks, blockquotes, and links. Standard CommonMark plus GitHub-flavored tables.

Can I convert HTML back into Markdown?

Yes. Use the HTML to Markdown tool to convert an HTML document into clean Markdown.