How to Convert Markdown to PDF
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.
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.
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
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.
Related Tools
Markdown to HTML
Convert Markdown documents to HTML with live preview and syntax support
HTML to Markdown
Convert HTML to Markdown format for documentation and content management
Markdown Fixer
Fix broken Markdown automatically, repair broken links, tables, and formatting errors
JSON to Markdown
Convert JSON data to Markdown tables, lists, or code blocks
Markdown to JSON
Parse Markdown tables and lists into structured JSON data
Markdown Editor
Write and preview Markdown in real-time with live preview