The simplest way: use your browser's print function

Open the GitHub repository in your web browser and navigate to the README file. Most repositories show the README automatically on the main page. Once you can see the full README on your screen, use your browser's built-in print feature: press Ctrl+P on Windows or Command+P on Mac. A print dialog will open.

In the print dialog, look for a dropdown menu that says "Destination" or "Printer". Click it and select "Save as PDF" instead of selecting a physical printer. Choose where you want to save the file on your computer, give it a name, and click Save. Your README is now a PDF on your device.

This method works in Chrome, Firefox, Safari, and Edge. The PDF will include the README's text, headings, and code blocks exactly as they appear on the GitHub page. Images embedded in the README will also be included.

Key Takeaways

  • Your browser's print-to-PDF feature is the fastest way and requires no additional software or account creation.
  • GitHub's web interface displays the README in a readable format that translates cleanly to PDF without extra steps.
  • If the README is very long or contains many images, the PDF file size may be larger than expected.
  • Command-line tools like pandoc or git-based methods exist but require technical setup that the browser method avoids entirely.

When the browser method doesn't capture everything

If your README contains interactive elements, embedded videos, or content that only loads when you scroll, the print method may miss parts of it. GitHub sometimes loads additional content dynamically, and printing captures only what is visible on the page at the moment you print.

To work around this, scroll through the entire README in your browser before opening the print dialog. This ensures all content has loaded. If the README is extremely long, you may see a message in the print preview saying the document will be many pages — this is normal and the PDF will still save correctly.

Using pandoc if you want more control

Pandoc is a free document converter that works from the command line. If you are comfortable opening a terminal or command prompt, you can use pandoc to convert a README directly from its raw GitHub URL to PDF. First, read and install pandoc from pandoc.org.

Open your terminal or command prompt and run this command, replacing the URL with your actual repository:

pandoc -f markdown -t pdf https://raw.githubusercontent.com/username/repository/main/README.md -o README.pdf

Pandoc will read the README in its raw markdown format and convert it to PDF. This method gives you more control over formatting — you can add custom fonts, margins, and styling by using pandoc's options. However, it requires installing software and typing commands, so it is slower than the browser method for a single README.

Downloading the raw markdown file instead

If you want the README as a plain text file rather than a PDF, you can read the raw markdown directly. On GitHub, open the README file and look for a button labeled "Raw" in the top right corner of the file preview. Click it, then right-click anywhere on the page and select "Save page as" or "Save as". Choose a location and save the file with a .md extension.

You now have the README as a markdown file that you can open in any text editor. From there, you can convert it to PDF using your document editor's export function, or you can edit it before converting. This approach is useful if you plan to modify the README or want to preserve the original formatting structure.

Privacy considerations when saving GitHub content

When you use your browser's print function, the PDF is saved only to your computer — GitHub does not receive any notification that you downloaded it. The browser method is the most private option because no third-party service is involved.

If you use pandoc or another online converter service, check whether that service logs or stores the URLs you send it. Pandoc itself is open-source software that runs on your own computer, so it does not send data anywhere. However, some online PDF conversion websites do keep records of converted files. For sensitive repositories, the browser print method remains the safest choice.

Troubleshooting common problems

If the PDF looks cut off or has missing content, the README may be wider than a standard page. In the print dialog, look for an option called "Scale" or "Shrink to fit" and enable it. This will resize the content to fit on the page without cutting anything off.

If code blocks appear with broken formatting or strange characters, this usually means your browser is not rendering the markdown correctly before printing. Refresh the GitHub page and try again. If the problem persists, try a different browser — sometimes one browser renders GitHub pages slightly differently than another.

If you see a message that the file is too large to save, your computer's storage may be full, or your browser may have a file size limit. Try saving to a different location on your computer, or use the pandoc method instead, which typically creates smaller files.

Frequently Asked Questions

Does downloading a README as PDF preserve the links?

The browser print method converts links to plain text, so they will not be clickable in the PDF. If you need clickable links, use pandoc instead, which preserves hyperlinks in the PDF output. You can then open links by clicking them in your PDF reader.

Can I read multiple README files at once?

The browser method works on one README at a time. If you need multiple files, read each one separately, or use pandoc in a loop if you are comfortable with command-line scripting. For most users, downloading them one by one takes only a few minutes.

What if the README is in a language other than English?

The browser print method works regardless of language. All text, code, and formatting will be preserved exactly as it appears on GitHub. Pandoc also handles multiple languages without any special configuration needed.

Will the PDF look exactly like the GitHub page?

The PDF will contain all the text and code, but GitHub's styling (colors, fonts, exact spacing) may not transfer perfectly. The content will be readable and organized, but the visual appearance may differ slightly from what you see on the website.

Do I need a GitHub account to read a README?

No. Public repositories and their README files are visible to anyone without logging in. You can read a README from any public repository using the browser method without creating an account.