Markdown to PDF Converter
Paste Markdown or upload a .md file, watch it render live, and save a clean PDF with your browser's print engine. Free, no sign-up, and everything runs locally on your device.
Rendering is local (marked + DOMPurify). Only the rendered document on the right is sent to the printer; this page's header, controls and footer are hidden automatically.
How this Markdown to PDF converter works
Paste your Markdown into the source box or drop a .md file onto the upload area. The text is parsed into HTML by marked, sanitized by DOMPurify so no raw HTML or scripts can leak through, and rendered in the live preview with clean document typography: styled headings, code blocks on a soft background, bordered tables, blockquotes and lists. Pick a font size and margin preset, then click Download as PDF. Your browser's print dialog opens; choose Save as PDF (or Microsoft Print to PDF on Windows) as the destination, and only the rendered document is printed. The site header, controls and footer are hidden by a dedicated print stylesheet.
Why print-to-PDF beats server-side converters
Online converters send your text to a server, re-render it with that server's fonts, engine and page defaults, and hand you back a file you have no control over. Line breaks shift, code blocks lose their formatting, tables overflow, and fonts get substituted. Print-to-PDF is different: the PDF is produced by the same browser engine that drew the preview on your screen, so fonts, spacing, table borders and code formatting carry over with full layout fidelity. What you see in the preview is exactly what lands on the page.
Parsing, sanitizing and print layout happen in your browser. The converter does not upload the document to a conversion server, but referenced images can load from external hosts. Check a document's external resources before previewing it. Offline use depends on the libraries already being loaded. See the privacy policy for advertising and other external services.
Frequently asked questions
How do I convert Markdown to PDF?
Paste your Markdown into the box or drop a .md file onto the upload area. A live preview renders instantly. Adjust font size and margins if you like, then click Download as PDF. In your browser's print dialog, choose Save as PDF (or Microsoft Print to PDF) as the destination and save the file.
Why use print-to-PDF instead of an online converter?
Server-side converters re-render your document with their own fonts, engines and page defaults, which often shifts line breaks, mangles code blocks and drops styling. Print-to-PDF uses your browser's own print engine on the exact preview you see, so fonts, spacing, tables and code formatting carry over with full layout fidelity.
Is my Markdown uploaded anywhere?
The converter parses and sanitizes Markdown locally without uploading the document to a conversion server. Images or other external resources referenced by your document can make network requests when previewed. Offline use requires the libraries to have loaded, and external images may be unavailable.
Which Markdown features are supported?
Headings, bold, italic, links, images, ordered and unordered lists, blockquotes, inline code, fenced code blocks, tables and horizontal rules. Rendering is done by marked with GitHub-flavored Markdown support, and the output is sanitized with DOMPurify so raw HTML in your file cannot inject scripts.
Can I change the paper size or margins?
Yes. This tool offers font size presets (small, medium, large) and margin presets (compact, normal, wide). Paper size (A4 or Letter) and orientation are set in your browser's print dialog when you save the PDF.