Guide

How to Turn a GitHub README into a PDF

Updated June 1, 2026

A polished README.md is the front door to your project, and sometimes you need it as a PDF — for a portfolio, a grant application, a client handoff, or offline reading. The challenge is keeping everything that makes a README look good: GFM tables, fenced code blocks with syntax highlighting, task lists, and those status badges at the top. This guide shows how to turn a GitHub README into a PDF without losing any of it.

Step 1: Get the raw Markdown

Don’t copy from the rendered GitHub page — you’ll pick up extra HTML and lose the clean source. Instead:

  1. Open the repository on GitHub and click README.md.
  2. Click the Raw button (or Code view) to see the unrendered Markdown.
  3. Select all and copy. This gives you the exact source, badges and all.

The badge lines are just Markdown image links (for example ![build](https://.../badge.svg)), so copying the raw source preserves them.

Step 2: Paste and preview

Open MarkdownToFile and paste the README in, or start from the ready-made README example to see the formatting in action. The live, paginated preview renders it immediately, so you can confirm everything carried over:

  • GFM tables keep their borders and alignment.
  • Fenced code blocks get syntax highlighting (via highlight.js).
  • Task lists show real checkboxes.
  • Badges load as images — note that badge images are fetched from their host (shields.io, CI providers, etc.), so they appear only if you’re online and the badge URL is reachable.
  • Headings, blockquotes, links, footnotes, and horizontal rules all render as GitHub-flavored Markdown.

Step 3: Style and export

Pick a theme — GitHub mirrors how the README looks on github.com, while Clean gives a more neutral print look. Set the page size (A4 or Letter), choose margins, and optionally enable a table of contents for long READMEs. Then download. The result is a real vector PDF with selectable text and proper page breaks. Everything runs in your browser, so the README is never uploaded anywhere.

What gets preserved

README elementRendered in PDF?Notes
GFM tablesYesBorders and alignment kept
Code blocksYesSyntax highlighting applied
Task listsYesCheckboxes shown
BadgesYes (online)Fetched from their image host
Images / screenshotsYesLoaded from their URL
Footnotes & linksYesLinks remain clickable

Handy fixes for README quirks

  • Badges not showing? Confirm you’re online and the badge URL still resolves; private CI badges may need a token GitHub normally supplies.
  • Wide tables overflowing? Switch to wide margins, Letter or A3 page size, or trim non-essential columns.
  • A huge README? Enable the table of contents and let natural page breaks do the work; very long documents lean on the browser’s print engine.
  • Need a Word file? Use “Copy HTML” and paste into Word or Google Docs — formatting comes along.

Where other tools fit

If you maintain a docs pipeline and want READMEs converted automatically on every release, Pandoc or a CI script is the better tool for that automation. If you live in VS Code, the “Markdown PDF” extension converts the file you already have open. For a quick, private, no-install one-off, the copy-paste browser workflow above is the fastest way to turn a GitHub README to PDF.

Bottom line

Turning a GitHub README into a PDF is mostly about preserving tables, code, and badges — and copying the raw Markdown into a GFM-faithful renderer handles all three. With a client-side tool you get a clean vector PDF in under a minute, with nothing uploaded.

Try it with the README example, or jump to the dedicated GitHub README to PDF and README to PDF pages.

Written by Markdown to PDF Editorial Team

Our team specializes in document design, web standards, and developer utilities. This guide was researched and vetted against current browser printing standards and Paged.js specifications. Learn more on our About page.

Try it yourself — free, no signup

Convert your Markdown to a polished PDF right in your browser.

Open the editor