The fastest way to save a README as PDF
The simplest method is to use your browser's built-in print function. Open the README file on GitHub, press Ctrl+P (Windows) or Command+P (Mac), then select "Save as PDF" from the printer dropdown. This captures the formatted text and any images, and takes about 30 seconds.
If you want more control over the output — different margins, page breaks, or a specific layout — you can use a dedicated tool like Pandoc or a browser extension. The choice depends on whether you need the PDF once or plan to convert many READMEs regularly.
Key Takeaways
- Your browser's print-to-PDF feature works for most READMEs and requires no extra software or login.
- GitHub's raw file view sometimes formats better than the repository page view when printing.
- Pandoc is a free command-line tool that converts README files to PDF with more formatting options than print-to-PDF.
- Browser extensions like Print Friendly can remove clutter like navigation menus before you save the PDF.
Using your browser's print function
Open the GitHub repository and navigate to the README file. You will see it displayed on the main page of the repository. Press Ctrl+P on Windows or Command+P on Mac to open the print dialog.
In the printer dropdown at the top, select Save as PDF instead of a physical printer. Check the preview pane on the right side to see how the page will look. Adjust the margins and scale if needed — most people leave these at default. Click the Save button and choose where to store the file on your computer.
This method works reliably for most READMEs because GitHub's web page is already formatted for reading. The PDF will include the text, code blocks, images, and links exactly as they appear on the screen.
Printing from the raw file view for cleaner output
If the standard README page includes too much GitHub interface (navigation, sidebar, comments), switch to the raw file view first. On the GitHub page, look for the Raw button near the top right of the file content. Click it to open just the plain text version of the README.
From the raw view, press Ctrl+P or Command+P again and save as PDF. This removes all GitHub styling and gives you a simpler, text-focused document. The trade-off is that images and some formatting may not display — you get the content without the visual polish.
Use this approach when you only need the text and code, or when the GitHub interface is cluttering your PDF output.
Converting with Pandoc for advanced formatting
Pandoc is a free tool that converts documents between many formats, including Markdown to PDF. If you work with READMEs often or need precise control over fonts, spacing, and layout, Pandoc gives you more options than print-to-PDF.
First, download and install Pandoc from pandoc.org. Then download the README file itself — go to the raw view, right-click, and select Save as to save it as a .md file to your computer. Open your command line or terminal and run this command:
pandoc README.md -o README.pdf
Replace "README.md" with the actual filename if it is different. Pandoc will create a PDF in the same folder. You can customize the output by adding flags — for example, pandoc README.md -o README.pdf --pdf-engine=wkhtmltopdf uses a different rendering engine that sometimes handles images better.
Pandoc requires some comfort with the command line, but it is worth learning if you convert documents regularly.
Using browser extensions to clean up the page
Extensions like Print Friendly & PDF (available for Chrome and Firefox) let you remove unwanted elements before saving. Install the extension, then open the README on GitHub and click the extension icon. A preview appears showing what will print — you can toggle off the GitHub header, sidebar, comments, and other clutter.
Once you have hidden the elements you do not want, click Print and select Save as PDF from the printer dropdown. This gives you a cleaner final document than printing the full GitHub page, but still simpler than learning Pandoc.
These extensions are free and work with any website, not just GitHub, so they are useful if you save web pages to PDF regularly.
Handling images and links in your PDF
When you print a README to PDF using your browser, images that are hosted online will appear in the PDF as long as you have an internet connection during the print. If an image is broken or missing on GitHub, it will not appear in your PDF either.
Links in the PDF will be clickable if you open the PDF in a reader that supports them — most modern PDF readers do. The link will point to the same URL it pointed to in the original README, whether that is a website, another GitHub page, or a file.
If a README includes relative links (links that point to other files in the same repository), those links may not work in your PDF because the PDF is now a standalone file. Test your links after saving to make sure they work the way you need them to.
Troubleshooting common problems
If your PDF looks cut off or has missing content, the page may be too wide for the default print settings. Open the print dialog again and try changing the scale to 80% or 90%, or switch the orientation from portrait to landscape. Preview the result before saving.
If code blocks are not displaying correctly, you may be using the raw view, which strips out formatting. Go back to the regular GitHub page view and print from there instead — the code blocks will have syntax highlighting and proper indentation.
If images are not appearing, check that you have an internet connection and that the images load on the GitHub page itself. Some images may be blocked by your browser or network. If an image is truly missing from GitHub, it will not appear in your PDF no matter which method you use.
Frequently Asked Questions
Can I save a README without downloading anything to my computer?
Yes. Use your browser's print-to-PDF feature — it requires no software installation and works immediately. Open the README, press Ctrl+P or Command+P, select Save as PDF, and you are done. This is the fastest option for a one-time conversion.
Will the PDF look exactly like the README on GitHub?
It will look very similar, but not identical. GitHub's web styling will be preserved, but some interactive elements like dropdown menus will not work in the PDF. Code blocks, images, and formatted text will all transfer correctly.
What if the README is very long and creates a huge PDF?
Long READMEs will create longer PDFs, but the file size is usually small because it is mostly text. If you want to reduce the file size, use the raw view instead of the full GitHub page — this removes styling and images, making the PDF smaller and faster to share.
Can I edit the PDF after I save it?
You can edit a PDF with tools like Adobe Acrobat or free alternatives like LibreOffice Draw, but editing is more difficult than editing the original Markdown file. If you need to make changes, edit the README on GitHub first, then save a new PDF.
Does this work for READMEs in private repositories?
Yes, as long as you are logged into GitHub and have permission to view the repository. The print-to-PDF method will work the same way. If you are not logged in, GitHub will prompt you to sign in before showing the README.