Skip to the content

Contact usFree tools · No signup · Files stay on your device

PDF Tools

How to turn a GitHub README into a PDF

How to turn a GitHub README into a PDF

A README is often the best documentation a project has, and sometimes you need it as a PDF: for a supervisor who wants a report, a client who will not open GitHub, a job application, or a printed copy for a meeting. The quickest way is our free Markdown to PDF converter. You copy the raw text of README.md, paste it in, and download a clean PDF. Nothing is uploaded, so it also works for private repositories.

READMEs have a few habits that ordinary Markdown does not, such as badges, centred logos and relative image paths. This post shows the exact steps and what to expect from each of those.

Step 1: get the README text

You need the Markdown source, not the page as GitHub draws it.

  1. Open the repository on GitHub and click README.md in the file list.
  2. Click the Raw button. The page now shows the plain Markdown text.
  3. Press Ctrl+A, then Ctrl+C to copy all of it. (Cmd+A and Cmd+C on a Mac.)

If you already have the project on your computer, just open the README.md file in any editor, or pick it with the Open file button in the next step.

Do not select and copy text from the normal rendered README page. You will lose the Markdown symbols, and tables and code blocks will not paste cleanly.

Step 2: convert it

  1. Open Markdown to PDF.
  2. Paste the text into the box labelled "Markdown to convert", or press Open file and choose README.md. The tool accepts .md, .markdown, .mdown and .txt files.
  3. Under "PDF options", pick the Page size, Margins, Font and Text size. For a printed document, A4, Normal (2 cm) margins, 11 or 12 pt is a good start.
  4. Tick "Page numbers at the bottom (Page 1 of 3)" if the README is longer than a page or two.
  5. Press "Convert to PDF & download".

The result panel shows how many pages were made and a page-by-page Preview. Read the preview before you send the file, especially the top of page one, where READMEs keep their badges and logos.

What happens to the typical README parts

Badges and logos

Badges such as "build passing" or a version number are normally pictures loaded from a web address. The tool never downloads anything, so these are left out. In their place the PDF prints each picture's description in italics, still linked if the badge was a link; a badge written with an empty description, such as [![](https://img.shields.io/…)](…), leaves nothing. A note under the result says something like "4 pictures from the web were left out".

A centred logo written as HTML, for example <p align="center"><img src="logo.png" alt="Project logo"></p>, follows the same rule: the tags are dropped and the alt text is printed.

If the italic descriptions clutter the top of the page, delete the badge lines from the pasted text before converting. They are plain Markdown lines, so deleting them takes a second.

Screenshots

A screenshot written as ![Dashboard](docs/dashboard.png) is a file inside the repository, not part of the text, so it is also left out and the description appears instead. The note under the result counts it separately, as a picture "linked to a file".

To keep a screenshot, embed it in the text as a data URL: ![Dashboard](data:image/png;base64,...). Only PNG and JPEG work this way; a GIF or WebP is skipped with a note. Our Base64 Encoder/Decoder turns an image file into a data URL, and embedding an image as Base64 explains the steps. Keep the picture small, because it is stored in the PDF at full size.

Code blocks

Installation steps and examples come out in a typewriter font on a light grey panel, with every line break and indent kept. There is no syntax colouring, and the language name after the three backticks is ignored. Long lines wrap to the page width, so a very long command can look broken across two lines even though it is one.

Diagrams written in a language such as Mermaid are code blocks to this tool, so they print as their source text.

Tables

Feature tables and option tables are drawn as a bordered grid. Cell text is plain; the header row is bold and repeats on every page the table runs onto. A table with many wide columns continues onto further pages in column groups, each headed like "Table · columns 5–8". A narrower table reads better; shorten cells or use Narrow margins or Landscape orientation.

Links to websites and email addresses are blue, underlined and clickable. Links to other files, such as [Contributing](CONTRIBUTING.md), and in-page links, such as [Install](#install), are printed as plain text. A "Table of contents" list at the top of a README still prints, but its entries will not jump to a section.

Task lists and emoji

Checklists with - [ ] and - [x] get an empty or ticked box. Real emoji characters and the task boxes are drawn by the browser as small images, so they look right but cannot be selected. Emoji written as shortcodes, such as :rocket:, are not converted and print exactly as typed. Replace them with the real character or delete them.

Collapsible sections

GitHub's <details> and <summary> blocks are read for their text. The tags disappear and the words stay, so the hidden content appears in full in the PDF.

Make it look like a proper report

For a university project or a client handover, a few small choices make a README look like a real document.

  • Start the file with one # heading containing the project name. The first level-1 heading is also saved as the PDF's title.
  • Use Serif font, 12 pt and Wide margins for a formal printed look, or Narrow margins and 10 pt to keep a long README short.
  • Add page numbers.
  • If the README has sections for several audiences, delete the ones the reader does not need before you convert.

Need more than the README, such as a report plus the README plus a cover sheet? Convert each, then join them with the steps in merge PDF files without uploading them.

Common problems and how to fix them

The PDF has no pictures at all

That is expected for a README whose pictures are files or web links. Embed them as PNG or JPEG data URLs, or accept the italic descriptions.

Raw HTML makes the layout plain

Complicated HTML, such as tables built from <table> tags and styled boxes, is read only for its text. The words are kept, but there is no CSS layout, colour or alignment. Rewrite those parts as Markdown tables and lists if the layout matters.

The file is too big to email

Embedded pictures are the cause. Reduce them before embedding, or shrink the finished PDF with Compress PDF.

I want to check the Markdown first

Paste it into the Markdown Previewer to see how headings, lists and tables render, then convert. The Markdown to PDF guide lists every option in detail.

Quick checklist

  • Copy the raw README text, not the rendered page.
  • Delete badge lines and any section the reader does not need.
  • Choose A4, Normal margins and tick page numbers.
  • Expect pictures from the repository to become italic descriptions.
  • Read the preview before you send the PDF.

Frequently asked questions

Why are the badges at the top of my README missing?
Badges are pictures loaded from a web address, and the tool never downloads anything. Each one is replaced by its description in italics (a badge with no description leaves nothing behind), and a note under the result counts how many pictures were left out.
Will the screenshots in my README appear in the PDF?
Only if they are embedded in the text as PNG or JPEG data: URLs. Screenshots stored as files in the repository, such as docs/screenshot.png, are left out and replaced by their description.
Do the links in the README still work in the PDF?
Links to http, https and mailto addresses are clickable. Links to other files in the repository, such as docs/setup.md, and links to #sections are printed as plain text.
Is my private repository's README uploaded anywhere?
No. The text is converted in your browser and never sent to our server. You only copy the text from GitHub yourself, so a private README stays private.
Can I convert a README for a university project report?
Yes. Pick A4, Normal margins, Serif font, 12 pt and page numbers for a formal look, and check the preview before you submit.
Found this useful? Share it

Tools in this guide

Main tool

Markdown to PDF

Paste Markdown or open a .md file and download it as a tidy PDF: README files, notes, documentation and drafts.

Open tool

Markdown Previewer

Write Markdown and see it rendered instantly, with GitHub-style tables, task lists and code blocks.

Open tool

Base64 Encoder/Decoder

Convert text or any file to Base64, or decode Base64 back to readable text or the original file.

Open tool

Compress PDF

Reduce the file size of a PDF with lossless optimisation, smaller images or full-page compression for scans —.

Open tool

Back to all guides & blog