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

How to Convert Markdown to PDF

Step 1

Input Your Markdown Content

Start by adding your Markdown content to the editor. You can paste it, upload a .md file, or click Sample to see an example document with headings, a code block and a table. Coming from another format? The HTML to Markdown converter and the JSON to Markdown tool get you there first.

•
Paste directly: Copy your Markdown text and paste it into the editor
•
Upload a file: Click Upload to pick a .md, .markdown or .txt file from your device
•
Try the sample: Click Sample to load example Markdown with various formatting elements
Step 2

Customize PDF Settings

The settings panel next to the editor decides how the PDF looks. Every page gets a 20 mm margin. For other PDF jobs there is also an HTML to PDF converter and a JSON to PDF tool.

•
Theme: GitHub, Academic, Professional or Minimal
•
Page size and orientation: A4, Letter or Legal, portrait or landscape
•
Code Theme and font size: GitHub, Monokai, Nord or Dracula colours for code blocks, and body text from 10pt to 16pt
•
Extras: page numbers at the bottom of each page, and a table of contents made from your headings
Step 3

Generate and Download PDF

Click the green Generate PDF button. Everything happens in this browser tab. Every page is drawn separately, so a long document takes noticeably longer than a one-page note.

What Happens During PDF Generation

1.
Markdown to HTML: Your Markdown becomes HTML, and anything that could run code (scripts, event handlers, iframes) is stripped out
2.
Styling: The theme, font size and code colours are applied in a hidden frame that is exactly as wide as the page
3.
Page breaks: The document is split between paragraphs, list items, table rows or code lines so lines are not cut in half
4.
Pages: Each page is drawn as a picture and placed on a PDF page of the size you chose, with page numbers if you asked for them
5.
Download: The finished PDF is saved by your browser as document-<number>.pdf

Tips for Best Results

  • •Use a clear heading hierarchy (H1 for the title, H2 for sections, H3 for subsections); the table of contents follows it
  • •Try a few themes: GitHub suits technical docs, Academic suits papers, Professional suits business documents
  • •Put the language after the opening fence (```python) so the code colours know what they are looking at
  • •Wide tables fit better in landscape, and a smaller font size squeezes more onto each page
  • •Need a web page instead? Convert Markdown to HTML, or tidy data first with the JSON formatter

Frequently Asked Questions

What Markdown syntax is supported?

GitHub Flavored Markdown: headings, bold and italic, ordered and bulleted lists, tables, fenced code blocks, block quotes, links, images and strikethrough. A single line break in your text becomes a line break in the PDF, so short lines such as addresses stay on separate lines. Plain HTML inside the Markdown works too, minus anything that could run code.

Can I select or search the text in the PDF?

No. Each page is a picture of your rendered document, which is why emoji, accented letters and non-Latin scripts come out exactly as they look on screen, and why numbers like 8901240544102066246 or 00501 are never changed. The catch is that you cannot copy text out of the PDF or search it. If you need selectable text, convert the Markdown to HTML and use your browser's Print to PDF instead.

How long can my Markdown document be?

One PDF holds up to 50 pages. Longer documents stop there and the page tells you, so split very long files into parts. Pages break between paragraphs, list items, table rows and code lines wherever that is possible, and the tool tries not to leave a heading alone at the bottom of a page. Each page is an image, so expect a few hundred kilobytes per page.

Does my Markdown get uploaded anywhere?

No. The PDF is built in your browser and your text is not sent to our server or kept anywhere; reload the page and the editor starts empty. The page does download the web fonts used by the themes, but your content never leaves the tab.

What do the themes and code colours change?

GitHub looks like a README on GitHub, Academic uses a serif font for papers and reports, Professional is a clean sans-serif layout for business documents, and Minimal keeps things plain. The Code Theme colours fenced code blocks that name their language, such as ```js or ```python. A block without a language name gets the scheme's background and text colour but no keyword colours.

What happens to images and HTML inside my Markdown?

Images appear in the PDF when their site allows other pages to load them; images that are blocked are left out rather than breaking the PDF. Scripts, event handlers, iframes and form fields are removed before rendering, so nothing in a pasted document can run.

Can I add page numbers and a table of contents?

Yes. Page numbers are printed at the bottom centre of every page as "2 / 9". The table of contents lists every heading, indented by level, on its own page at the start of the PDF. It shows the heading titles only, without page numbers or clickable links.

More Markdown tools: the Markdown editor shows a live preview, and the Markdown to HTML converter gives you the markup itself. The full syntax is described in the GitHub Flavored Markdown spec.