Writing and Developer Tool

Markdown to HTML Converter Live Preview, Source Output, and One-Click Copy

Write or paste Markdown, see the rendered HTML and the source side by side, then copy or download the result. Everything runs in your browser.

Last Updated: 4 November 2026

Convert your Markdown

Type or paste in the left column. The rendered preview and source HTML update as you write.

Markdown Input
0 characters

Rendered preview

Live

Your rendered Markdown appears here as you type.

Generated HTML

Source
Conversion summary
—
Converted locally in your browser.
Markdown length0Characters in the source
HTML length0Characters in the output
Elements0Tags generated
What this usually means

Start typing to see a conversion summary here.

Element breakdown

Conversion checks

Markdown source is present—
HTML output has been generated—
Headings use the correct hierarchy order—
Every link has both a label and a URL—

Optional AI insight

A short written read on the structure of your Markdown, plus one note on what to check before publishing the HTML. Only anonymous counts leave your browser when you press the button.

What this converter does and why fragments beat full documents

This tool takes plain-text drafts written in Markdown syntax and converts them immediately into clean, semantic HTML elements. Every heading, paragraph, bulleted list, numbered sequence, link, lazy-loaded image, inline code span, fenced code snippet, and blockquote in your source is translated into its corresponding HTML tag. As you type or paste, the output updates simultaneously in two panels: a Rendered preview that shows how a browser lays out the hierarchy, and a Generated HTML source box ready for one-click copying or file download. Every step runs locally inside your browser tab, so confidential drafts never travel across the network.

Markdown remains the standard drafting format for software engineers, technical writers, newsletter editors, and content strategists because plain text stays readable even before it is rendered. Typing ## Deployment Checklist or **Required** keeps your hands on the keyboard without opening and closing angle brackets, hunting for mismatched closing tags, or fighting hidden rich-text styles copied out of word processors. Yet almost every publishing destination on the web ultimately expects HTML.

Crucially, this converter produces an HTML body fragment rather than a full standalone document. That means the generated source starts directly with structural elements such as <h2>, <p>, and <ul> instead of wrapping the output in <!DOCTYPE html>, <html>, <head>, and <body> tags. When you paste markup into a WordPress Custom HTML block, a Ghost HTML card, a Shopify product description, a help-center editor, or an email marketing template, the host platform already supplies the outer document shell. Pasting a duplicate <head> or <body> tag inside an existing page breaks DOM validation and can strip surrounding styles, whereas a clean HTML fragment drops neatly into any content slot.

If you choose to press the optional Get AI insight button below the conversion summary, only anonymous structural counts leave your browser: input length, output length, heading count, paragraph count, list item count, link count, code block count, and whether multiple <h1> headings exist. Neither your Markdown prose nor your generated HTML is ever transmitted or stored.

Complete Markdown syntax reference and exact HTML output

Core Markdown is intentionally compact so you can master every token in a single sitting. The reference table below shows each construct recognized by this converter alongside the exact HTML markup it emits and the spacing rule required for reliable detection.

Markdown syntaxExact HTML outputSpacing and boundary rule
# Heading 1 to ###### Heading 6<h1>Heading 1</h1> to <h6>Heading 6</h6>Requires 1 to 6 leading hashes followed by at least one space before the heading text.
Plain text line<p>Plain text line</p>Any non-empty line outside a code fence that does not start with a block marker becomes a paragraph.
**bold** or __bold__<strong>bold</strong>No space immediately inside the opening or closing double markers; conveys strong importance.
*italic* or _italic_<em>italic</em>Single asterisk or underscore hugging the words on the same line; conveys stress emphasis.
`inline code`<code>inline code</code>Wrap variable names, CLI flags, file paths, or HTTP status codes in single backticks.
- item, * item, or + item<ul><li>item</li></ul>Leading marker plus space; consecutive bullet lines merge into one <ul> until a blank or non-bullet line.
1. First then 2. Second<ol><li>First</li><li>Second</li></ol>Digits followed by a period and a space; browser numbers items sequentially in the rendered list.
> Quoted note<blockquote>Quoted note</blockquote>Starts with > (optional single space); each quoted line outputs a clean <blockquote> element.
[Label](https://example.com)<a href="https://example.com">Label</a>Square brackets hold visible anchor text; parentheses hold a whitespace-free destination URL.
![Alt text](/chart.webp)<img loading="lazy" src="/chart.webp" alt="Alt text">Exclamation mark before brackets; automatically adds native loading="lazy" for faster page loads.
```js ... ```<pre><code>...</code></pre>Line starting with three backticks opens or closes a literal block; inline Markdown inside is not parsed.

Line breaks, list grouping, and code fence boundaries

Understanding three structural rules will save you nearly all post-conversion cleanup. First, leave one blank line between headings, paragraphs, lists, and code blocks. In this converter, consecutive unordered list lines (-, *, or +) are collected into a single <ul> container, and consecutive numbered lines (1., 2.) are collected into a single <ol> container; as soon as a blank line or another block marker appears, the open list closes cleanly. Second, write each paragraph as a single unwrapped line rather than hard-wrapping lines at 80 columns with the Enter key, because line-oriented converters wrap each standalone prose line in its own <p> tag. Third, inside triple-backtick code fences (```), asterisks, underscores, and hashes are preserved verbatim rather than turned into bold text or headings, making fenced blocks safe for shell scripts, SQL queries, Python comments, and configuration files.

How two-pass parsing and HTML entity escaping prevent XSS bugs

Converting human-written text into HTML carries a subtle security and rendering trap: what should happen when a technical article mentions literal angle brackets such as Array<string>, mathematical inequalities like x < 10 && y > 0, or an untrusted snippet such as <script>alert(1)</script>? If a naive converter leaves raw angle brackets untouched, the browser treats <string> as an unknown invisible HTML tag (swallowing the word in the preview) and executes <script> tags as live JavaScript — a classic Cross-Site Scripting (XSS) vulnerability.

To keep the generated markup both visually accurate and safe to paste into third-party systems, this converter processes your source through a deterministic four-stage pipeline:

  1. Line-ending normalization: Windows carriage-return pairs (\r\n) and legacy Mac returns (\r) are normalized to Unix newlines (\n) so pasted text behaves identically regardless of operating system.
  2. Block-level classification: The scanner inspects each line in order to detect triple-backtick code fences first, followed by ATX headings (# to ######), unordered list items, ordered list items, blockquotes, and fallback paragraphs.
  3. Character entity escaping (esc): Before any HTML wrapper or inline tag is inserted, raw text characters with special meaning in HTML are converted to named or numeric entities: & becomes &amp;, < becomes &lt;, > becomes &gt;, double quotes become &quot;, and single quotes become &#39;.
  4. Inline token transformation (inline): Only after raw characters are escaped does the inline pass convert image tokens, link tokens, backtick code spans, strong markers, and emphasis markers into controlled HTML tags. Fenced code blocks skip the inline pass completely so code syntax remains untouched.
Technical architecture diagram on a white background showing the four-stage Markdown-to-HTML pipeline: Stage 1 Markdown Input, Stage 2 Block Pass for headings, fenced code, lists, blockquotes, and paragraphs, Stage 3 HTML Entity Escaping turning angle brackets and ampersands into safe entities for XSS prevention, and Stage 4 Inline Pass producing clean HTML fragments.
Figure 1: Two-pass Markdown parser and entity-escaping sequence. Escaping raw angle brackets and ampersands before running inline token replacement ensures that literal code expressions and untrusted tags render visibly as safe text while converter-generated HTML tags remain well-formed.

Here is a concrete trace showing how a single line containing bold formatting, an ampersand, inline code, and a raw script tag moves through the pipeline:

Raw Markdown line: Check **v2.4** & `<input>` before blocking <script>run()</script> After block check: Classified as paragraph (<p>...</p>) After esc() shield: Check **v2.4** &amp; `&lt;input&gt;` before blocking &lt;script&gt;run()&lt;/script&gt; After inline() pass: <p>Check <strong>v2.4</strong> &amp; <code>&lt;input&gt;</code> before blocking &lt;script&gt;run()&lt;/script&gt;</p>

One publishing check still belongs to you: inspect the URL schemes inside your Markdown links before publishing user-submitted content. Always use https://, root-relative paths like /pricing, fragment anchors like #section-2, or mailto: addresses, and never publish untrusted javascript: pseudo-URLs inside anchor tags.

Markdown dialects compared: Gruber, CommonMark, GFM, and MDX

Writers switching between GitHub, Notion, Reddit, Slack, Obsidian, and static site frameworks often notice that the same Markdown file renders slightly differently on each platform. That happens because Markdown began in 2004 when John Gruber and Aaron Swartz released an informal syntax guide and a Perl script (Markdown.pl) without a formal grammar. Different developers resolved edge cases — such as how many spaces indent a nested list or whether blank lines are required before blockquotes — in incompatible ways.

In 2014, a group of engineers led by John MacFarlane published CommonMark, an unambiguous specification backed by hundreds of conformance tests, alongside IETF registrations RFC 7763 and RFC 7764 establishing the text/markdown media type. GitHub subsequently built GitHub Flavored Markdown (GFM) as a strict superset of CommonMark, adding four developer-focused extensions: pipe tables, task checklists, tilde strikethrough, and bare URL autolinking. Static site generators (Astro, Hugo, Eleventy, Next.js MDX) add a third outer layer for build-time metadata such as YAML frontmatter and embedded UI components.

Three-column specification chart on a white background comparing CommonMark Core features supported in this tool (headings, paragraphs, blockquotes, bold, italic, inline code, links, lazy images, lists, and fenced code blocks) against GitHub Flavored Markdown extensions (pipe tables, task checklists, strikethrough, bare URL autolinks) and Static Site or MDX additions (YAML frontmatter, footnotes, JSX components).
Figure 2: Markdown dialect capabilities across CommonMark Core, GitHub Flavored Markdown, and MDX tooling. Keeping source documents restricted to the CommonMark core guarantees portable conversion across CMS editors, documentation engines, and browser utilities.
Feature / SyntaxGruber (2004)CommonMark Core (This Tool)GitHub Flavored (GFM)Static Site / MDX
ATX headings (# to ######)SupportedSupportedSupportedSupported
Emphasis, inline code, links, imagesSupportedSupported (adds loading="lazy")SupportedSupported
Fenced code blocks (```)Not in originalSupportedSupported (syntax highlight)Supported
Pipe tables (| Col A | Col B |)Not supportedRendered as plain <p>SupportedVia GFM plugin
Task checklists (- [x] Done)Not supportedRendered as bullet itemSupportedVia GFM plugin
Strikethrough (~~removed~~)Not supportedKept as literal tildesSupported (<del>)Via GFM plugin
YAML frontmatter (--- header)Not supportedTreated as prose/list markerMetadata table on GitHubParsed as page data

Practical workaround for GFM tables: If a GitHub README you paste here contains a pipe table, convert the surrounding prose and headings first, paste the HTML fragment into your CMS, and insert the table using your CMS's native Table block or semantic <table><thead>...</thead><tbody>...</tbody></table> markup.

Step-by-step publishing workflows for CMS platforms and HTML email

How you paste the generated HTML fragment determines whether it renders cleanly on the first try or displays raw angle brackets to readers. Different publishing environments apply very different CSS inheritance and tag-sanitization rules.

Split workflow diagram on a white background showing how a converted HTML fragment branches into two publishing destinations: Web CMS and Static Sites (paste into Custom HTML block, inherit site stylesheet, check HTML sanitizer allowlist) versus HTML Email Clients (wrap in table container, apply inline CSS styles onto paragraph, heading, and link tags, and use absolute HTTPS image URLs).
Figure 3: Destination checklist for Web CMS editors versus HTML email templates. Web content management systems automatically style bare semantic tags via external stylesheets, whereas email clients require explicit inline CSS declarations and absolute image URLs.

1. WordPress (Gutenberg Block Editor and Classic Editor)

  1. Omit a duplicate top-level # title: WordPress automatically wraps your post title field in an <h1> tag. Start your Markdown body headings at ## (<h2>) so the published page maintains a single <h1>.
  2. Insert a Custom HTML block: In the Block Editor, type /html on an empty line and select Custom HTML, then click Copy HTML on this page and paste into that block. Do not paste raw HTML into a standard Paragraph block, or WordPress will escape your tags and display literal <h2> text on the live post. (In the Classic Editor, switch from the Visual tab to the Text / Code tab before pasting.)
  3. Convert to native blocks if desired: Click the three-dot menu on the WordPress Custom HTML block and choose Convert to Blocks if you want editors to adjust images or headings visually afterward.

2. Ghost, Webflow, Shopify, and Help-Center Portals

In Ghost, type /html in the editor to open an HTML card and paste the copied fragment; Ghost's theme stylesheet immediately formats all <h2>, <blockquote>, and <pre><code> elements to match your publication. In Shopify product descriptions, Webflow rich-text embeds, and customer support portals such as Zendesk or Intercom, click the Show HTML (<>) toggle in the toolbar before pasting. Review any external <img> URLs in preview mode, as strict enterprise help desks sometimes strip third-party image domains until they are uploaded to the platform's own media library.

3. HTML Email Newsletters and Transactional Emails

Email clients do not behave like modern web browsers. Desktop Microsoft Outlook uses Word's layout engine, and Gmail strips unsupported properties or class selectors depending on how the message is clipped or forwarded. When pasting converted HTML into an email builder (Mailchimp, Brevo, ConvertKit, Postmark, or Amazon SES):

  • Inline critical typography styles: Bare <p> and <h2> tags work immediately inside visual newsletter "Code" blocks that wrap your fragment in template defaults, but for raw transactional HTML emails you should add inline font-family, font-size, line-height, margin, and link color attributes (or run the fragment through a CSS inliner) before sending.
  • Use absolute HTTPS image paths: Relative image paths such as /images/diagram.png fail inside an inbox because the reader is viewing the message on mail.google.com or an iOS Mail client rather than on your domain. Always write full https://yourdomain.com/images/diagram.png URLs in Markdown destined for email.
  • Send a real inbox test: Preview the rendered message on both mobile dark mode and desktop webmail, especially if your Markdown includes <pre><code> blocks with long unbreakable lines.

Three worked examples from raw Markdown to production HTML

Seeing exact input-to-output pairs makes it easier to structure your drafts before pressing Convert. Each worked example below reflects the exact markup produced by this tool.

Worked Example 1 · SaaS Release Notes

Converting a product changelog update for an in-app widget and customer newsletter

Suppose a product manager drafts version 2.8.0 release notes in Markdown so engineering can review them in Git before marketing pastes the HTML into an announcement widget:

## Release 2.8.0: Instant CSV Exports We reduced export memory usage by **62%** for workspaces with more than 50,000 rows. - Added streaming UTF-8 downloads via the `/exports/csv` endpoint - Fixed currency rounding on *multi-currency* invoices - Read the [migration guide](https://docs.example.com/v2-8) before upgrading

The converter outputs 6 total elements (1 heading, 1 paragraph, 3 list items grouped inside 1 <ul>, and 1 link) with zero wrapper bloat:

<h2>Release 2.8.0: Instant CSV Exports</h2> <p>We reduced export memory usage by <strong>62%</strong> for workspaces with more than 50,000 rows.</p> <ul><li>Added streaming UTF-8 downloads via the <code>/exports/csv</code> endpoint</li><li>Fixed currency rounding on <em>multi-currency</em> invoices</li><li>Read the <a href="https://docs.example.com/v2-8">migration guide</a> before upgrading</li></ul>
Worked Example 2 · Developer Documentation

Preserving shell commands and angle brackets inside fenced code blocks

A developer documenting an API webhook needs both an installation command and a curl payload containing quotes and ampersands:

### Verify Webhook Signatures Run the local listener with your `WEBHOOK_SECRET` environment variable: ```bash export WEBHOOK_SECRET="whsec_live_94a" && npm run listen ```

Notice two intentional details in the generated HTML below: the language hint bash after the opening backticks is stripped cleanly rather than leaking into the code body, and the double ampersand && plus quotes inside the code fence are entity-escaped so every character copies cleanly out of the rendered documentation page:

<h3>Verify Webhook Signatures</h3> <p>Run the local listener with your <code>WEBHOOK_SECRET</code> environment variable:</p> <pre><code>export WEBHOOK_SECRET=&quot;whsec_live_94a&quot; &amp;&amp; npm run listen</code></pre>
Worked Example 3 · Editorial Blog Section

Combining hierarchical headings, blockquotes, and lazy-loaded images

An editor preparing a case study includes a section heading, an image with descriptive alt text, and a customer quote:

## Checkout Latency Results ![Checkout response time dropping from 840ms to 190ms](https://cdn.example.com/latency-q3.webp) > Moving static assets to edge cache cut mobile abandonment by 18% in four weeks.

The converter outputs semantic tags and automatically injects loading="lazy" on the <img> element so below-the-fold illustrations defer network downloads until the reader scrolls near them:

<h2>Checkout Latency Results</h2> <p><img loading="lazy" src="https://cdn.example.com/latency-q3.webp" alt="Checkout response time dropping from 840ms to 190ms"></p> <blockquote>Moving static assets to edge cache cut mobile abandonment by 18% in four weeks.</blockquote>

Wrapping a converted HTML fragment into a standalone web page

When you click Download HTML, the browser saves a file named converted-markdown.html containing only your converted fragment. If you double-click that file directly on your desktop, two things often surprise first-time users: accented characters, em-dashes, or currency symbols may appear garbled (such as —) because no UTF-8 character encoding was declared, and mobile browsers zoom out to a tiny desktop viewport because no responsive viewport meta tag is present.

Whenever you want to host or share the converted file as a standalone web page on Netlify, Cloudflare Pages, GitHub Pages, or S3, wrap your copied fragment inside this minimal, standards-compliant HTML5 shell:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Document Title</title> <style> body { max-width: 46rem; margin: 2.5rem auto; padding: 0 1.25rem; font-family: system-ui, sans-serif; line-height: 1.7; color: #111; } pre { background: #111; color: #f8fafc; padding: 1rem; border-radius: 0.5rem; overflow-x: auto; } code { font-family: ui-monospace, monospace; font-size: 0.9em; } blockquote { margin: 1.25rem 0; padding: 0.75rem 1rem; border-left: 4px solid #eab308; background: #fafafa; } img { max-width: 100%; height: auto; } </style> </head> <body> <main> <!-- Paste your converted HTML fragment here --> </main> </body> </html>

Once wrapped, you can optionally pass the finished file through AfriWidget's HTML Minifier to strip whitespace and comments before deploying to a static server.

Semantic HTML, WCAG accessibility, and search engine optimization

Clean Markdown produces accessible, search-friendly HTML only when the author uses Markdown tokens for their structural meaning rather than their visual size. Both assistive technologies (under W3C WCAG 2.2 Success Criteria 1.3.1 Info and Relationships and 2.4.6 Headings and Labels) and search engine crawlers rely on the DOM tree your Markdown generates to understand how topics relate on the page.

Side-by-side DOM outline diagram on a white background contrasting a valid accessible semantic document tree (single h1 page title branching to h2 main section and h3 subsection, descriptive anchor text on links, and alt plus loading=lazy on images) against broken anti-patterns (multiple h1 tags, skipped h1 to h4 heading levels, bold paragraph fake headings, and generic click here links).
Figure 4: Valid semantic DOM hierarchy versus common Markdown outline anti-patterns. Screen-reader heading rotors and search crawlers map page sections from sequential <h1>–<h6> elements and descriptive link anchors, ignoring paragraphs merely styled in bold.
  • Maintain a single <h1> and sequential subheadings: Screen-reader users frequently press the H shortcut key (in NVDA and JAWS) or open the VoiceOver Headings rotor to scan a page's outline before reading paragraphs. Reserve # (<h1>) for the single primary page title — or omit # altogether if your CMS template already outputs the post title as <h1>. Nest major topics under ## (<h2>) and subsections under ### (<h3>) without jumping straight from <h1> to <h4>. Watch the Headings use the correct hierarchy order row in the Conversion checks panel above, which flags multiple <h1> tags automatically.
  • Never fake headings with standalone bold lines: Writing **Installation Steps** on its own line outputs <p><strong>Installation Steps</strong></p>. Visually it may look heavy, but assistive technology and automated table-of-contents scripts treat it as ordinary body prose. Use ## Installation Steps or ### Installation Steps instead.
  • Write self-describing link anchor text (WCAG 2.4.4): Screen readers can list all links on a page out of context, and search engines weight anchor words heavily when indexing destination URLs. Replace vague phrases like [click here](https://example.com/pricing) or [read more](/security) with specific destinations such as [compare annual API pricing tiers](https://example.com/pricing).
  • Supply functional alt text and check LCP images: Write concise ![alt](url) descriptions that convey the takeaway of an informational chart or screenshot to someone who cannot see it. For purely decorative dividers, leave the brackets empty (![](divider.svg)) so the converter outputs alt="" and screen readers skip it cleanly. Note that this converter adds loading="lazy" to every <img>; if an image sits at the very top of your viewport as the page's Largest Contentful Paint (LCP) hero banner, remove loading="lazy" on that single first image in your CMS so the browser fetches it immediately.

Cleaning drafts pasted from Notion, Google Docs, and Obsidian

Many writers draft inside knowledge-management apps or cloud word processors and export to Markdown right before publishing. Those exports frequently contain platform-specific tokens or invisible Unicode characters that trip up standard HTML converters:

  • YAML frontmatter at the top of static-site files: Markdown files from Astro, Hugo, Jekyll, Docusaurus, or Obsidian vaults often start with a metadata block between two --- lines containing title:, date:, and tags:. Strip that top block before converting, or those metadata lines will appear as visible paragraphs at the top of your HTML output.
  • Obsidian and Roam [[WikiLinks]] and callouts: Internal double-bracket links ([[Project Roadmap]]), embedded transclusions (![[diagram.png]]), and callout headers (> [!WARNING]) are proprietary vault syntax rather than CommonMark. Convert internal links to standard [Project Roadmap](/project-roadmap) format and replace callout tags with bold lead-ins such as > **Warning:** before exporting.
  • Non-breaking spaces (U+00A0) from Google Docs or Word: Copying Markdown markers out of rich-text documents or PDFs sometimes substitutes a non-breaking space or zero-width space after # or -, or converts straight backticks and quotes inside code examples into curly typographic quotes (“ ”). If a heading or code snippet refuses to format, run the raw text through AfriWidget's Text Case & Cleanup tool first or retype the space after the marker.
  • Notion toggle blocks and database exports: Notion exports toggle lists and multi-column layouts using either indented plain text or embedded raw <details>/<aside> tags. Because this converter escapes raw HTML tags for safety, replace Notion toggles with standard ## / ### subsections before converting.

Troubleshooting common Markdown conversion mistakes

If an element in the Rendered preview does not match what you intended, check the symptom against this diagnostic reference:

Observed symptomUnderlying causeExact fix in Markdown source
#Introduction renders as a plain paragraphMissing space between the hash symbol and heading text.Add a single space after the hashes: # Introduction.
** bold ** shows literal asterisksSpaces sit immediately inside the opening or closing emphasis markers.Tighten the asterisks directly against the characters: **bold**.
Link breaks mid-URL or shows raw bracketsThe URL contains an unencoded space or unescaped closing parenthesis (common in Wikipedia links).Replace spaces with %20 and closing parentheses inside URLs with %29.
Half the document turns into a black code boxAn opening triple-backtick fence (```) was never closed, or has leading spaces on the closing line.Add a standalone ``` line flush with the left margin right after the code snippet.
GitHub pipe table renders as lines with | barsPipe tables are a GFM extension outside the CommonMark core supported here.Convert prose here, then add the table natively in your CMS or with HTML <table> tags.
Sub-bullets flatten into one bullet levelThis lightweight line parser groups consecutive bullets into a flat <ul> or <ol>.Rewrite deep outlines as ### subheadings with flat lists, or nest <ul> inside <li> in HTML.
Manual edits to HTML vanish laterTeam members edited the exported HTML instead of updating the master .md file.Keep the .md file in Git or notes as the single source of truth and regenerate HTML on release.

Where this tool stops and when to use a build compiler

This converter is built for speed, privacy, and zero-configuration clarity on core CommonMark documents: headings, paragraphs, bold and italic emphasis, inline code, fenced code blocks, links, lazy-loaded images, unordered lists, ordered lists, and blockquotes. It intentionally omits GitHub Flavored Markdown tables, task lists, footnotes, definition lists, strikethrough, bare URL autolinking, Setext underline headings, math typesetting, and raw HTML passthrough. It also does not crawl your links to confirm HTTP 200 responses or validate whether your destination CMS strips specific attributes.

For single blog posts, README previews, product changelogs, help-center articles, academic notes, and newsletter fragments — and especially when pairing word-count checks with the Reading Time & Speech Estimator — an instant in-browser converter is the fastest, safest tool for the job. Once you are maintaining dozens or hundreds of interlinked Markdown pages that require automated GFM tables, syntax-highlighted AST transforms, YAML frontmatter routing, and automatic sitemap generation, graduate to a dedicated build-time compiler such as unified (remark + rehype), markdown-it, Astro, Hugo, or Eleventy.

Sources and technical specifications

  1. MacFarlane, J. CommonMark Spec — A strongly defined, highly compatible specification of Markdown. spec.commonmark.org
  2. GitHub. GitHub Flavored Markdown (GFM) Formal Specification. github.github.com/gfm
  3. Gruber, J. (2004). Markdown: Syntax and Original Documentation. Daring Fireball. daringfireball.net
  4. WHATWG. HTML Living Standard — Grouping Content and Text-Level Semantics. html.spec.whatwg.org
  5. MDN Web Docs. HTML Elements Reference & Lazy Loading Guide. Mozilla. developer.mozilla.org
  6. Leonard, S. (2016). IETF RFC 7763 — The text/markdown Media Type. Internet Engineering Task Force. rfc-editor.org/rfc/rfc7763
  7. Leonard, S. (2016). IETF RFC 7764 — Guidance on Markdown: Design Philosophies, Stability Strategies, and Select Registrations. rfc-editor.org/rfc/rfc7764
  8. W3C (2023). Web Content Accessibility Guidelines (WCAG) 2.2 — Info and Relationships (1.3.1), Headings and Labels (2.4.6), and Link Purpose (2.4.4). w3.org/TR/WCAG22
  9. OWASP Foundation. Cross Site Scripting (XSS) Prevention Cheat Sheet — Output Encoding Rules. cheatsheetseries.owasp.org

Frequently asked questions

What does a Markdown to HTML converter do?

A Markdown to HTML converter takes text written in the Markdown syntax, such as headings written with a hash symbol and bold text written with double asterisks, and turns it into HTML elements. Headings become h1 through h6 tags, paragraphs become p tags, lists become ul or ol elements, links become anchor tags, and code blocks become pre and code elements. The output is a short block of HTML that you can paste into a content management system, a documentation site, an email template, or a static page.

Is my Markdown uploaded to a server?

No. The converter runs inside your browser, and the parsing and rendering happen locally in the page. Your draft text never leaves your device. No request is sent when you type, when you press Convert, or when you copy or download the output. If you press the AI insight button, only anonymous details such as the input length, the number of headings, and the number of list items are sent to a small serverless function that runs once and then stops. The actual Markdown text and the resulting HTML are never included in that request.

Which Markdown features are supported?

This converter handles the most common Markdown features: headings from one to six hashes, paragraphs separated by blank lines, bold text with double asterisks or double underscores, italic text with single asterisks or single underscores, inline code wrapped in backticks, fenced code blocks opened and closed with three backticks, unordered lists using hyphens, asterisks, or plus signs, ordered lists using digits and a period, blockquotes using a leading greater-than sign, links in the square-bracket and round-bracket form, and images in the exclamation-mark form. Markdown extensions such as tables, footnotes, task lists, and definition lists are not supported and may need manual editing after conversion.

Why does my bold or italic text not render correctly?

The most common cause is a missing space after the marker, or an asterisk sitting next to a character that also happens to be part of the emphasis markers. Bold requires two asterisks on each side with no space between the asterisk and the text. Italic requires one asterisk on each side with no space. Nested emphasis, such as bold inside italic, is handled by the converter but can be confusing to read in the source. If you are mixing Markdown from different platforms, the emphasis rules can differ slightly; keep the markup simple and check the preview before you publish.

Can I use the output in a WordPress post or a CMS?

Yes, but the destination matters. Many content management systems accept raw HTML in a custom HTML block but sanitise certain tags and attributes for safety. Images with an external source URL, for example, may be stripped depending on the site's policy. Paste the output into a preview or a draft first, check that the rendered result matches the preview on this page, and adjust anything the CMS has removed. If the CMS has its own Markdown editor, you may not need to convert at all; the raw Markdown will be handled directly by the platform.

Does the converter escape HTML typed inside the Markdown?

Yes. If you type an angle bracket and a tag name inside your Markdown, the converter escapes it to its entity form so that the tag appears as text rather than being executed as HTML. This is a safety measure: it prevents accidental script injection when the output is pasted into a page you do not fully control. If you deliberately want to include a piece of raw HTML in the output, this converter does not provide that option; you would add it in the destination system instead.

What is the difference between CommonMark and GitHub Flavored Markdown?

CommonMark is a strictly specified version of Markdown that resolves the ambiguity in the original syntax. It defines exactly how every edge case should be parsed, so different tools that implement CommonMark produce the same output. GitHub Flavored Markdown, often shortened to GFM, is a superset of CommonMark that adds tables, task lists, strikethrough, and autolinks. This converter follows the CommonMark behaviour for the features it supports and does not include the GFM extensions. If you need tables or task lists, write the HTML directly in the destination system.

Can I download the HTML as a file?

Yes. Press Download to save the current output as an HTML file. The file contains the converted markup as plain HTML, without a full page wrapper, a doctype, or any styling. That makes it easy to paste the content into a larger page or to import it into a build pipeline. If you need a complete HTML page with a head and a body, add the wrapping elements in your editor after you download the fragment.

Why does the preview look different from my CMS?

The preview on this page renders the HTML with a small set of neutral styles that are meant to make headings, lists, and code readable at a glance. A content management system, a documentation site, or a browser extension applies its own stylesheet on top of the same HTML. The underlying structure, which is the important part, is identical. If you want a closer match to the destination, paste the output into a draft on the destination platform and compare the rendered result there rather than on this page.

Can I keep my Markdown source after I convert it?

Yes, and you should. Markdown is easier to review, diff, and edit than raw HTML, so the source is usually the better document to keep as the master copy. Convert on demand, publish the HTML, and keep the Markdown in version control or a notes folder. If a team member later edits the generated HTML directly, the next conversion will overwrite those edits, which is another reason to treat the Markdown as the source of truth and the HTML as a build artifact.

How do I turn the downloaded HTML fragment into a complete standalone web page?

Create or open an .html file in any plain-text editor, add a standard HTML5 document shell starting with <!DOCTYPE html> and <html lang="en">, include <meta charset="UTF-8"> and <meta name="viewport" content="width=device-width, initial-scale=1"> inside <head>, and paste your converted fragment inside a <main> or <article> container within <body>. Including the UTF-8 character encoding declaration ensures curly quotes, currency symbols, and accented letters display accurately across browsers.

Why do YAML frontmatter blocks or Obsidian WikiLinks appear as plain text?

YAML frontmatter delimited by triple hyphens (---) at the top of a file and double-bracket WikiLinks such as [[Page Name]] are application-specific extensions used by static site generators (Hugo, Astro, Jekyll, Eleventy) and personal knowledge apps like Obsidian. Because neither construct belongs to core Markdown, a standard parser treats frontmatter lines as paragraphs or list markers and leaves double brackets untouched. Delete the frontmatter header before converting, and rewrite internal WikiLinks in standard [Page Name](/page-name) syntax.

How do I add syntax-highlighting classes or open converted links in a new tab?

By design, this converter outputs clean, attribute-light HTML: fenced code blocks become <pre><code>...</code></pre> and links become <a href="url">label</a>. If your site uses Prism.js or Highlight.js, add a language class such as <code class="language-js"> to the generated code tag in your editor. If an external link must open in a new browser tab, add target="_blank" rel="noopener noreferrer" to that specific anchor element in the destination HTML.

Why do consecutive lines without a blank line become separate paragraphs here?

Different Markdown engines treat single line breaks differently: strict CommonMark merges adjacent lines into one paragraph with a soft space, whereas chat apps, issue trackers, and line-oriented converters treat each non-empty line outside a list or code fence as its own paragraph. This converter evaluates prose line by line so hard-wrapped notes do not collapse unexpectedly. To keep each paragraph distinct across every Markdown tool you use, write each paragraph as a single unwrapped line separated by one blank line.

Explore more productivity and developer tools

Alongside this Markdown converter, there are utilities for word counting, text cleanup, HTML minification, and JSON formatting. All free, all private, all running in your browser.

See all productivity tools