PDF guide · 2 min read · Updated September 27, 2026

How to Convert a Markdown or README File to PDF

Create a clean PDF from Markdown notes, documentation or a GitHub README, with tables, code blocks, LaTeX math, images and your own custom CSS styling.

Why convert Markdown to PDF

Markdown is ideal for writing documentation, notes and READMEs, but not everyone you share them with has a Markdown viewer. A PDF looks the same for every reader, can be printed, and can be attached to an email or uploaded to a portal.

How to convert Markdown to PDF

Markdown to PDF previews your document in the browser, then sends the Markdown and any CSS to PDF Utility's server to generate the PDF. The content is deleted from the server as soon as the PDF is returned.

  1. Open Markdown to PDF.
  2. Paste your Markdown, or upload a .md, .markdown or .txt file.
  3. Optionally add CSS, or upload a .css file, to adjust fonts, colors and spacing.
  4. Check the preview, then export the PDF.

What is supported

The PDF is rendered by a headless browser on A4 pages, so text stays real: it can be selected, searched and copied, and links remain clickable.

  • Headings, paragraphs, bold, italic, lists, quotes and horizontal rules.
  • Tables, inline code and fenced code blocks.
  • Links, including bare URLs, which are turned into links automatically.
  • Math written in LaTeX: $x^2$ for inline formulas and $$...$$ for display formulas.
  • Images from public https:// URLs, which the server downloads and embeds (up to 20 images, 5 MB each).
  • Single line breaks are kept, so text looks the way it was typed.

Converting a GitHub README

Open the README on GitHub, choose Raw, and copy the text, or download the README.md file and upload it. Images in READMEs often use relative paths such as docs/screenshot.png, which only work inside the repository. Replace them with full URLs, for example the raw.githubusercontent.com address of each image, so they appear in the PDF.

Tips for a polished PDF

  • Start with a single top-level heading as the document title.
  • Keep wide tables to a few columns so they fit within the page width.
  • Split very long code blocks, which can run across a page break.
  • Use CSS such as body { font-size: 11pt; } to fit more on each page.

Frequently asked questions

Is the text in the PDF selectable?

Yes. The PDF contains real text, so you can select, search and copy it, and links stay clickable.

Does Markdown to PDF support math equations?

Yes. Write LaTeX between $...$ for inline math or $$...$$ for display equations.

Why are my images missing from the PDF?

Only images at public https:// URLs can be embedded. Replace relative paths with full URLs.