Markdown to HTML (and PDF)

Convert Markdown to clean HTML with a live preview. GitHub-style tables and line breaks, copy the HTML, download a full styled page or save it as a PDF – sanitised with DOMPurify and processed in your browser.

  • Free
  • No upload
  • No signup
  • Works offline

Your files never leave your device

How to use Markdown to HTML

  1. 1Write or paste Markdown

    Type in the Markdown box or paste from a README, note or chat. The Preview updates as you type.

  2. 2Choose options

    Tick GitHub-style (tables, line breaks) for GitHub Flavored Markdown, and Full HTML page to wrap the output with a head and basic styling.

  3. 3Copy or download the HTML

    Use Copy HTML to paste into a CMS or email, or Download .html for a file.

  4. 4Save as PDF

    Press Save as PDF (print) and choose Save as PDF in the print dialog.

From plain text to web-ready HTML

Markdown is the easiest way to write formatted text: # for headings, **bold**, - for lists and [text](url) for links. It’s used in GitHub READMEs, documentation, note apps like Obsidian and Notion, chat tools and AI assistants. But websites, email builders and many CMSs need HTML. This Markdown to HTML converter gives you clean HTML with a live preview.

How it works

Type or paste into Markdown. The tool converts it with marked, a fast and standards-compliant Markdown parser, and shows the result in Preview and the code in HTML output. The output is cleaned with DOMPurify, so it contains no scripts or unsafe attributes – important if the Markdown came from somewhere you don’t control, such as user submissions or AI output.

Options

GitHub-style (tables, line breaks). Enables GitHub Flavored Markdown:

  • Tables with | pipes and a --- separator row.
  • Strikethrough with ~~text~~.
  • Task lists with - [ ] and - [x].
  • Autolinks – bare URLs become links.
  • Line breaks – a single newline becomes <br>, as in GitHub comments. Untick it for strict Markdown, where you need a blank line for a new paragraph.

Full HTML page (with and basic styling). Wraps the output in a complete HTML document with a UTF-8 charset, a mobile viewport and simple, readable styles. Use it to create a standalone page or a file to print. Leave it unticked to get just the content to paste into an existing site.

Output

  • Copy HTML copies the HTML to your clipboard – the status shows “Copied.”
  • Download .html saves the result as a file.
  • Save as PDF (print) opens a print view of the rendered document. Choose Save as PDF as the destination. If your browser blocks the pop-up, the tool tells you to allow pop-ups or download the .html and print it.

Markdown cheat sheet

MarkdownResult
# HeadingHeading level 1 (## for level 2…)
**bold**, *italic*bold, italic
- item or 1. itemBulleted or numbered list
[text](https://…)Link
![alt](image.png)Image
`code`Inline code
``` on its own lineCode block
> quoteBlockquote
---Horizontal rule

Common uses

  • Publishing a README or docs page on a website.
  • Pasting AI-generated answers into a CMS or email without losing formatting.
  • Writing blog posts in Markdown and pasting HTML into WordPress’s code editor.
  • Email newsletters – paste the HTML into your email tool’s HTML block.
  • Printing notes as tidy PDFs.

Tips

  • Check headings. Use one # heading for the title and ## for sections – good for accessibility and SEO.
  • Images referenced by relative paths won’t display unless the files are on the same server; use full URLs.
  • Count your words with Word Counter before publishing.
  • Extract text from PDFs to turn into Markdown with PDF to Text.

Privacy

Conversion happens in your browser; your drafts are never uploaded.

Frequently asked questions

How do I convert Markdown to HTML?

Paste your Markdown, check the Preview, then press Copy HTML or Download .html. The HTML updates live as you edit.

Does it support GitHub Flavored Markdown?

Yes. With GitHub-style ticked you get tables, strikethrough, task lists, autolinks and single line breaks as in GitHub comments.

Is the HTML safe to paste into my website?

The output is sanitised with DOMPurify, which removes scripts, event handlers and other dangerous markup, so pasted content can't run code.

How do I turn Markdown into a PDF?

Press Save as PDF (print) and choose Save as PDF as the printer. If pop-ups are blocked, allow them or download the .html file and print it from your browser.

What is the difference between the fragment and the full page?

Without Full HTML page you get just the body markup to paste into an existing page. With it, you get a complete document with a head, UTF-8 charset and readable styling that you can open directly.

Is my text uploaded?

No. Markdown is converted in your browser with marked.

Cookie settings

Choose which optional technologies may be used on this browser. Your choice is saved on this device only (in local storage) and is sent to Google using Consent Mode. Files you process are never uploaded, whatever you choose.

Remembers your theme and this consent choice, and lets the site work offline. Always on; nothing is shared.

Lets Google store and read cookies to serve, cap and measure ads, and receive ad-related data about your visit (ad_storage, ad_user_data). If off, Google may still show limited, non-personalised ads without cookies.

Lets ads be tailored to your interests (ad_personalization). Requires Advertising.

Allows privacy-friendly usage statistics (analytics_storage). We do not run analytics today; this stays off unless you allow it.