Markdown to PDF Converter
Convert Markdown to a beautifully styled PDF β free, no watermark, no signup, no upload to any server. Type or paste Markdown in the editor and watch the live preview update instantly. Choose from three PDF themes, set page size and margins, then download your PDF or use the browser print dialog for selectable text.
β¬ Download PDF β instant download, no dialog. Text is image-based (not selectable). Theme, page size & margins are applied.
π¨οΈ Print to PDF β for selectable, searchable text: set Destination β Save as PDF in the print dialog (not "Microsoft Print to PDF"). Window closes automatically.
How to Convert Markdown to PDF
Type or paste Markdown into the editor on the left, or click Upload .MD to open a .md or .markdown file from your computer. Click Example to load a sample document with all supported formatting β headings, tables, code blocks, and blockquotes.
Watch the live preview on the right update as you type. Select a theme (Classic, Modern, or Minimal), page size (A4, Letter, Legal), orientation, and margins. The preview updates immediately when you change any option.
Click Download PDF for an instant silent download β no dialog, no watermark. Or click Print to PDF and set Destination β Save as PDF in the print dialog for a PDF with selectable, searchable text. The print window closes automatically.
Features
Editor and preview side by side. The preview updates as you type with a 350ms debounce β fast and unobtrusive.
Classic (Georgia serif), Modern (dark code blocks), and Minimal (clean sans-serif). Switch themes and see the preview update instantly.
Download PDF produces an instant file with no print dialog and no watermark β image-based, great for visual documents.
Print to PDF via browser dialog produces real, searchable, copyable text β ideal for reports, CVs, and contracts.
Upload any .md, .markdown, or .txt file directly from your computer. Loaded locally β nothing sent to server.
A4, Letter, Legal. Portrait or Landscape. Four margin presets. Applied as @page CSS so the output matches your selections precisely.
What Is Markdown and Why Convert It to PDF?
Markdown is a lightweight plain-text markup language designed to be readable as-is while also converting cleanly to formatted output. Created by John Gruber in 2004, it uses simple punctuation to indicate formatting: # for headings, ** for bold, * for italic, - for list items, and pipe characters for tables. Today, Markdown is the dominant format for GitHub README files, developer documentation, technical writing, and note-taking apps including Obsidian, Notion, and Bear.
Converting Markdown to PDF matters because Markdown files require a viewer or processor to show their formatted output. A raw .md file opened in a generic text editor shows the markup symbols as literal text. PDF, by contrast, renders identically on every device and platform β fonts, layout, and styling are all embedded in the file. When you need to share Markdown content with colleagues who are not developers, submit a document for formal review, print a handbook, or archive a specification, PDF is the right delivery format.
Common workflows include: converting GitHub README files to PDF for offline documentation packages, converting meeting notes written in Obsidian or Notion to PDF for client delivery, converting technical API specifications to PDF for stakeholder review, and converting academic notes to PDF for printing and annotation. For HTML-based documents rather than Markdown, our HTML to PDF tool handles those directly.
How Markdown Parsing Works β Marked.js
This tool uses Marked.js v9, one of the most widely deployed JavaScript Markdown parsers β it powers GitHub Pages, Ghost CMS, and thousands of documentation platforms. Marked.js uses a two-stage pipeline: a lexer first tokenises the input text into block tokens (headings, paragraphs, code blocks, blockquotes, lists, tables, horizontal rules) and inline tokens (bold, italic, inline code, links). A renderer then converts each token into its corresponding HTML element.
By default, Marked.js v9 supports GitHub-Flavored Markdown (GFM) β an extended CommonMark specification that adds pipe tables, strikethrough, task lists, and autolinks. The parsed HTML is injected into a complete document template with your chosen theme CSS and @page rules for page size and margin control. This produces a self-contained HTML document that renders consistently whether it is displayed in the preview iframe, the print window, or the hidden rendering iframe used for the Download PDF path.
The parser is loaded once from the jsDelivr CDN on first use and cached in memory for subsequent conversions. Your Markdown text is never sent anywhere β parsing happens entirely in your browser tab.
Choosing the Right PDF Theme
Classic theme uses Georgia as the body font and Arial for headings β a combination that has been the standard for academic papers, legal documents, and formal reports for decades. Georgia is a serif font designed specifically for screen and print readability at body sizes. H1 headings get a green accent underline, code blocks have a subtle gray background with a green left border, and blockquotes are styled with an indented green border on a light background. Choose Classic for university assignments, formal business reports, client proposals, and printed handbooks.
Modern theme uses system-native sans-serif fonts (San Francisco on macOS, Segoe UI on Windows) that match the operating system's own UI β clean, contemporary, and highly legible at any size. Code blocks use a dark charcoal background with light text, giving a terminal-like appearance that developers expect from technical documentation. H2 headings have a subtle underline separator and green table headers provide colour accent without being distracting. Choose Modern for developer documentation, technical notes, API references, and contemporary business documents.
Minimal theme strips out most decorative styling β plain borders instead of coloured accents, simple weight differences instead of size hierarchy, no background fills. The result is a document that looks like a carefully formatted plain-text document β the content reads without visual interference. Choose Minimal for personal notes, simple memos, plain meeting summaries, and any situation where formatting should be invisible. For Word documents that need PDF conversion rather than Markdown, our Word to PDF tool is the right choice.
Writing Markdown That Converts Cleanly to PDF
Start every document with a single H1 heading (# Title). This becomes the document title in the PDF and anchors the visual hierarchy. Use H2 (##) for major sections and H3 (###) for subsections. Avoid skipping levels β jumping from H1 to H3 without an H2 in between creates awkward visual gaps in the rendered output.
For tables, use the GFM pipe syntax with a separator row: | Column | Column | then | --- | --- | then data rows. Control alignment with colons: :--- left-aligns, ---: right-aligns, and :---: centres. Right-align numeric columns so decimal points and digits line up vertically β much easier to scan at a glance. Tables with many columns may overflow on Portrait A4 β switch to Landscape orientation in the options panel for wide tables.
For code blocks, use triple-backtick fenced blocks with a language identifier: ```javascript. The language identifier is parsed by Marked.js but actual syntax colour-highlighting is not applied in the current PDF output β monospace font and block background distinguish code from prose. Use horizontal rules (---) sparingly to separate major document sections, not between every paragraph. Keep blockquotes (>) for genuine quotations or important callouts β overusing them reduces their visual impact.
Converting README Files and GitHub Markdown to PDF
GitHub README files are the most common real-world source of Markdown content that developers need to convert to PDF β for project handbooks, technical onboarding documents, or sharing documentation with non-GitHub users. Since Marked.js supports GFM (the same specification GitHub uses), most README content converts directly and cleanly.
To convert a README: navigate to your repository on GitHub, click the README.md file, then click the βRawβ button to see the plain Markdown source. Select all text (Ctrl+A / Cmd+A), copy, paste into the editor here, and choose Download PDF or Print to PDF. The main elements that differ from GitHub's own rendering: GitHub renders emoji shortcodes (:smile:) as actual emoji characters β these will appear as literal text here. Relative image links () will not resolve β only remote image URLs may load, subject to CORS headers. Task list checkboxes (- [ ] item) are parsed as list items without the checkbox UI.
For documentation projects using MkDocs, GitBook, or Docusaurus β where Markdown files use YAML front matter, custom directives, or framework-specific syntax β those extended features will appear as raw text. In those cases, use the framework's own PDF export feature or a tool like Pandoc with the appropriate extensions enabled.
Limitations and When to Use a Different Tool
The Download PDF path (html2canvas) captures a pixel image of the rendered document. Images with CORS restrictions may not appear. JavaScript within the Markdown (unusual, but possible in some extended formats) does not execute. Very long documents β more than 50,000 characters β may take several seconds to render and convert. The resulting PDF text is not selectable; use Print to PDF for selectable output.
LaTeX math equations ($$E = mc^2$$ or $\pi r^2$) are not rendered β they appear as raw LaTeX text. YAML front matter blocks (--- at the document start) are treated as horizontal rules or raw text rather than being parsed as metadata. Footnotes ([^1]) and custom container syntax (::: tip) used in some frameworks are not supported. For these features, Pandoc is the right tool β it supports the full Pandoc Markdown specification with a wide range of PDF output options including LaTeX-based PDF via XeLaTeX.
If your goal is generating PDFs from Markdown automatically in bulk β for example producing hundreds of personalised certificates or invoices β a browser-based on-demand tool is not suitable. Use a server-side pipeline with Puppeteer, WeasyPrint, or wkhtmltopdf instead. This tool is designed for individual on-demand conversions. For related post-conversion tasks, see our Compress PDF tool to reduce file size and our PDF to Text tool to extract content from existing PDFs.