How to Write a Great README.md (2026)
What goes into a README people actually use: research on 4,226 README sections and 1,163 installation edits, the sections a scientific-software guide recommends, and a test of the same README on GitHub and PyPI, where emoji, alerts, diagrams and relative links behave differently.
What READMEs Actually Contain
A README is the page people judge a project by, and researchers have counted what goes into them. Prana and colleagues hand-labeled 4,226 sections from 393 randomly sampled GitHub READMEs (Empirical Software Engineering, 2019, found through alphaXiv). Sections explaining what a project is and how to use it were very common, while many READMEs never said why the project exists or what state it is in. When the team marked sections with labels, most of the 20 software professionals they tested said the files became easier to search.
The file itself is now standard: in an analysis of 10,000 GitHub repositories over ten years, Hora, Montandon and Costa (2026) found README.md, .gitignore and LICENSE consolidated as the default trio. Venigalla and Chimalakonda (2022) compared 1,950 READMEs across ten programming languages and found that most popular projects organized theirs with lists and images and linked out to further documentation; that is a correlation, not proof that formatting made them popular.
The Sections Worth Writing
Benjamin Lee's "Ten simple rules for documenting scientific software" (PLoS Computational Biology, 2018, retrieved through PubMed) gives the most useful working assumption: the README may be the only documentation anyone reads. His list for it is how to install and configure the software, where the full documentation lives, the license, how to run the tests, acknowledgments and a quickstart. Add the two parts Prana's study found missing most often, purpose and status, and you get this skeleton:
# project-name
One sentence: what it does and for whom.
## Why
The problem it solves, and what makes it different.
## Status
Stable / beta / unmaintained; supported versions.
## Install
npm install project-name
## Quickstart
The shortest working example, with its expected output.
## Documentation
Link to the full docs.
## Tests
npm test
## License
MIT. See LICENSE.
Lead with what the project does rather than how it works, and name what sets it apart: "converts Markdown to PDF with no dependencies" tells a reader in one line whether to keep going. The README Generator fills in these sections from a form.
Installation Instructions Go Stale
Installation is the section that breaks first. Gao, Treude and Zahedi (2023) studied 1,163 README commits in 400 GitHub repositories that changed installation sections and sorted the changes into six groups: steps before installing, the installation itself, steps after it, help information, presentation, and links to outside resources. In practice that means pinning the versions your steps assume, showing the expected output of the first command, and rerunning the instructions in a clean environment, such as a fresh container, whenever dependencies change.
One README, Several Renderers
The same file is rendered by GitHub, by package registries such as PyPI and npm, and by editors. We ran one README through PyPI's renderer (readme_renderer 44.0, which uses the same cmark-gfm library as GitHub's parser) and through cmark-gfm directly. Both kept badges, a centered image with a width, task lists, a table and a <details> block. Four things that GitHub handles after parsing came through PyPI unchanged:
| In the README | On GitHub | On PyPI (readme_renderer 44.0) |
|---|---|---|
:rocket: | emoji, per GitHub Docs | literal text :rocket: |
> [!NOTE] | colored alert box | plain quote starting "[!NOTE]" |
```mermaid | rendered diagram | code block |
[setup guide](docs/setup.md) | link to the file in the repository | same relative link, which resolves under the project's PyPI page and points nowhere |
If a README is also your package page, use absolute URLs for links and images, and treat alerts, emoji shortcodes and diagrams as GitHub-only extras. GitHub Docs also explain that a single line break in an .md file does not start a new line; our Markdown guide tested that and other dialect differences across seven parsers.
Badges and License
Badges belong at the top, next to the project name, and work best when they report something a visitor cares about: build status, latest version, license. Shields.io makes static badges from the URL alone, https://img.shields.io/badge/license-MIT-blue for a blue license badge, and the Markdown Badge Generator writes the Markdown for you.
Add a LICENSE file. Without one, default copyright applies: choosealicense.com, which GitHub runs, explains that others may not reproduce, distribute or build on your code, although publishing on GitHub lets other users view and fork it there under GitHub's terms. MIT asks only for attribution, Apache 2.0 adds an express patent license, and GPL 3.0 requires distributed derivative works to use the GPL too; our license guide compares them in detail.
Frequently Asked Questions
How long should a README be?
Should I include screenshots?
What license should I choose?
README.md or README.rst?
- [1]Lee BD (2018), Ten simple rules for documenting scientific software, PLoS Computational Biology 14(12): e1006561 (via PubMed) โ
- [2]Prana GAA, Treude C, Thung F, Atapattu T, Lo D (2019), Categorizing the Content of GitHub README Files, Empirical Software Engineering; arXiv:1802.06997 (via alphaXiv) โ
- [3]Hora A, Montandon JE, Costa DE (2026), What's Inside a GitHub Repository? An Empirical Study on the Contents of 10K Projects, arXiv:2605.16701 (via alphaXiv) โ
- [4]Venigalla ASM, Chimalakonda S (2022), An Empirical Study On Correlation between Readme Content and Project Popularity, arXiv:2206.10772 (via alphaXiv) โ
- [5]Gao H, Treude C, Zahedi M (2023), Adapting Installation Instructions in Rapidly Evolving Software Ecosystems, arXiv:2312.03250 (via alphaXiv) โ
- [6]GitHub Docs, Basic writing and formatting syntax (emoji, alerts, relative links, line breaks), checked Oct 14, 2026 โ
- [7]GitHub Docs, Creating diagrams (Mermaid) โ
- [8]Python Packaging User Guide, Making a PyPI-friendly README โ
- [9]choosealicense.com, No License โ
- [10]Shields.io, Static badge โ