Loading Markdown to PDF Converter...
Please wait a moment

Exporting Markdown to PDF: A Full Walkthrough

Step 1

Add Your Markdown

Drop your Markdown into the editor by pasting it, uploading a .md file, or hitting Sample to load an example. Every part of the syntax is fair game here, from headings and lists to tables and fenced code. Coming from another format? The HTML to Markdown converter and the JSON to Markdown tool can get you there first.

Paste it in: copy your Markdown from anywhere and drop it straight into the editor
Open a file: use Upload to pull in a .md or .markdown file from your computer
Load the sample: tap Sample for a ready-made document that shows off the different elements
Step 2

Dial In the PDF Settings

Shape the finished document to taste. Swap between themes, set the page size and orientation, fine-tune the margins, and add a header or footer, with the preview updating as you go. Want to see your content on the web instead of as a PDF? Try the Markdown to HTML converter or draft in the Markdown editor.

Theme: pick a look, GitHub, Academic, Professional, or Minimal
Page size: go with A4, Letter, or Legal, whichever suits your audience
Margins: set the top, right, bottom, and left spacing independently
Code colors: choose a highlighting scheme for code blocks, GitHub, Monokai, Nord, or Dracula
Step 3

Generate and Save the PDF

With your content and settings in place, hit the green "Generate PDF" button and the conversion kicks off. Behind the scenes it drives a real Chrome engine through Puppeteer, so the typography, spacing, and layout come out exactly as rendered rather than approximated.

What's Going On Under the Hood

1.
Parsing: your Markdown is first turned into structured HTML, keeping every heading, list, table, code block, and link intact
2.
Styling: the theme you chose layers on its fonts, colors, and spacing to give the page a finished feel
3.
Rendering: a headless Chrome instance draws the document just as a browser would, so nothing gets approximated
4.
Exporting: that rendered page is written out to PDF using your page size, orientation, margins, and other preferences
5.
Download: the finished file lands in your browser's downloads, named with a timestamp so nothing gets overwritten

How Long It Takes

  • Short pieces (1-5 pages): roughly 15-20 seconds the first time, then 10-15 seconds after that
  • Mid-length docs (10-30 pages): around 20-30 seconds, depending on how many images and how much formatting they carry
  • Long documents (50+ pages): about 30-45 seconds, with a progress indicator keeping you posted
  • Expect the very first export to run a touch slower while the browser warms up, later ones speed up

A Few Tips Worth Knowing

  • Keep a clean heading structure, one H1 for the title, H2 for main sections, H3 for the level below, and the PDF will read logically
  • Try a couple of themes before settling: GitHub suits technical notes, Academic fits papers, Professional works for business material
  • If your document is code-heavy, lean toward a syntax scheme with strong contrast so the snippets stay legible in print
  • Switch on the table of contents for anything long, it makes navigation easier and looks more polished
  • Nudge the margins and font size to match how it'll be read, tighter for screens, roomier for print
  • Prefer a web version? You can export the same content as Markdown to HTML or keep polishing it in the Markdown editor

Fixing Common Export Hiccups

A handful of things trip people up on the first try. Here's how to sort each one out quickly:

Images aren't appearing: point any image links at a public URL. Files that live only on your own machine can't be reached while the page renders, so host them somewhere reachable first.
Wide code lines get clipped: switch to landscape orientation or shorten the longest lines, since very wide snippets can spill past a portrait page.
A block splits awkwardly across two pages: drop a blank line or a heading just before it so the renderer has a natural place to break.
That first export feels sluggish: it's just the browser engine warming up. Run it once and every export after that is noticeably faster.

Questions People Ask

Do images, diagrams, and emoji make it into the PDF?

Images that are reachable by URL are drawn straight into the page, and emoji come through as you'd expect. Diagrams written as fenced code (Mermaid, for instance) export as code unless they've already been turned into an image. Assembling the source from another format? The HTML to Markdown converter is a good place to begin.

Can I turn a GitHub README straight into a PDF?

That's one of the most common reasons people show up here. Paste the README's GitHub Flavored Markdown, choose the GitHub theme so it feels familiar, and export, tables, task lists, and highlighted code all carry across intact.

How much control do I get over the look?

Quite a lot. On top of the built-in themes you can set the page size (A4, Letter, or Legal) and orientation, adjust margins and font size, add headers and footers, and choose the syntax highlighting scheme for your code.

Does code keep its colors in the exported file?

It does. Code blocks hold onto their highlighting across dozens of languages, and you can match the tone of your document with a GitHub, Monokai, Nord, or Dracula palette.

What sets the four themes apart?

GitHub mirrors the styling you see in repositories, Academic leans on serif fonts suited to research papers, Professional stays crisp with a clean sans-serif for business material, and Minimal pares everything back for a distraction-free page.

Can I add a contents page and page numbers?

Both are a single checkbox away. Flip on Page Numbers for a consistent number in every footer, and tick Include Table of Contents to auto-build a TOC from your headings with page references.

Is there a limit on how long a document can be?

No hard ceiling, documents in the hundreds of pages export just fine, they only take a few extra seconds to render. Need to shape tabular data first? The CSV to Markdown table converter pairs nicely with this one.