How to write a README: structure, template and GitHub tips
How to write a README that people read: the sections to include, a copyable Markdown template, and how GitHub renders links, images and badges.

To write a README, create a file named README.md in the root of your project and answer five questions in order: what the project does, why someone would use it, how to install and run it, where to get help, and who maintains it. Use one # title, a ## heading per section, and fenced code blocks for every command. Keep it short enough to read in a few minutes and link to longer docs for the rest.
Those five questions come from GitHub's own guidance on what a README should contain (checked November 2026). Below is a template you can copy, what each section is for, and how GitHub renders the file.
What should a README include?
A README should tell a stranger what the project is and how to get it working, without them reading the code. GitHub lists the core topics as "What the project does," "Why the project is useful," "How users can get started with the project," "Where users can get help with your project," and "Who maintains and contributes to the project."
In practice that becomes these sections, in this order:
| Section | Answers | Required? |
|---|---|---|
| Title and one-line summary | What is this? | Yes |
| Why / features | Why would I use it? | Yes, a few lines |
| Requirements | What do I need first? | If there are any |
| Installation | How do I get it? | Yes |
| Usage | How do I run it? | Yes |
| Configuration | What can I change? | If options exist |
| Help and contributing | Where do I ask, how do I help? | Recommended |
| License | Can I use it? | Recommended |
Is there a README template you can copy?
Yes. Paste this into README.md, replace the placeholders, and delete any section that does not apply to your project.
# project-name
One sentence on what this project does and who it is for.
## Why use it
- The main problem it solves, in one line
- A second reason, if there is one
- What it does not do, so nobody is surprised
## Requirements
- Node.js 20 or later
- A PostgreSQL database (local or hosted)
## Installation
```bash
git clone https://github.com/your-org/project-name.git
cd project-name
npm install
```
## Usage
```bash
npm run start
```
Then open http://localhost:3000 in a browser.
A short example of the most common task:
```bash
npm run import -- --file data/sample.csv
```
## Configuration
| Variable | Default | What it does |
|---|---|---|
| `PORT` | `3000` | Port the server listens on |
| `DATABASE_URL` | none | Connection string for PostgreSQL |
## Documentation
Longer guides live in [docs/](docs/). Start with [docs/setup.md](docs/setup.md).
## Getting help
Open an issue with the steps to reproduce the problem and the output you saw.
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to set up a development copy and send changes.
## License
Released under the MIT License. See [LICENSE](LICENSE).
The template uses four backticks around the outer block only so it displays here with the inner code blocks intact. Your own README.md starts at # project-name.
What is each section for?
Each section removes one question a new reader would otherwise have to ask you. If a section does not remove a question for your project, cut it.
- Title and summary. The first sentence is often all a visitor reads before deciding whether to scroll. Say what it does in plain words ("Converts CSV exports into monthly reports"), not what it is built with.
- Why use it. Three bullets at most. Include what the project does not do; it saves people from installing something that cannot help them.
- Requirements. List versions. "Node.js" alone leads to issues from people on old versions.
- Installation. Every command in a fenced block with a language tag, in the order someone types them. Test the steps on a clean machine or a fresh clone before you publish. The code blocks page covers fences and language tags.
- Usage. The single most common task, with real input and the result. One working example is worth more than a list of every flag.
- Configuration. A table of options, defaults and effects. Tables read well for this; the syntax is on the tables page.
- Help, contributing, license. Short pointers to the issue tracker, a
CONTRIBUTING.md, and theLICENSEfile.
How should you structure headings?
Use exactly one # heading for the project name and ## for each section, with ### only for subsections. A clean outline matters on GitHub because it builds a navigation menu from your headings.
GitHub's README page says it "will automatically generate a table of contents based on section headings," opened from the Outline menu icon at the top of the rendered file. It also notes "You can link directly to any section that has a heading," so a heading such as ## Installation becomes a link target you can share. More on heading levels is in Markdown headings.
How does GitHub render a README?
GitHub shows the README on the repository's front page, rendered as GitHub Flavored Markdown. According to GitHub's documentation (checked November 2026):
- Where it looks. If you put a README in more than one place, GitHub shows the one in "the
.githubdirectory, then the repository's root directory, and finally thedocsdirectory." - Size. "Any content beyond 500 KiB will be truncated" when the README is viewed on GitHub.
- Relative links. GitHub "will automatically transform your relative link or image path based on whatever branch you're currently on." A link like
[setup](docs/setup.md)keeps working on every branch and in clones, which absolute URLs to one branch do not. - Paths. A path starting with
/is relative to the repository root, and./and../work as usual. - Line breaks inside links. Keep each link's text on one line; GitHub notes that a link split across lines will not work.
How do you add images and screenshots?
Store images in the repository, for example in docs/images/, and link them with a relative path. This keeps them working on forks and branches.

Write real alt text that says what the image shows. It is read by screen readers and shown if the image fails to load. Keep screenshots few and current; an outdated screenshot causes more confusion than none. The images page covers sizing options and alt text.
Do you need badges?
No. Badges are optional small images, usually at the top, that show a status such as whether tests pass. Add one only if it tells a reader something useful.
If you use GitHub Actions, GitHub documents a workflow status badge (checked November 2026) with this URL format:

Replace OWNER, REPOSITORY and WORKFLOW-FILE with your values, for example ci.yml. A row of ten badges pushes the summary below the fold, so two or three is a reasonable ceiling.
How do you keep a README accurate?
Treat it like code: update it in the same change that alters installation steps, commands or configuration. A README that describes last year's setup costs every new contributor time.
A short checklist before each release:
- Installation commands run on a fresh clone
- Usage example produces the output shown
- Configuration table matches the defaults in code
- Every relative link opens the right file
Writing a README in Noteline
Noteline is a Markdown editor that opens your project folder and edits README.md as a plain file, with headings, tables and fenced code blocks shown formatted as you type and syntax highlighting inside code blocks. The Table of Contents panel (Cmd+Shift+O on a Mac, Ctrl+Shift+O on Windows and Linux) shows the same heading outline GitHub will build. Images appear as their alt text rather than the picture, so check screenshots in GitHub's preview. More on using it alongside code is on the developers page.