How to Add a GitHub Contribution Grid to Your Profile README
The GitHub contribution grid embeds your full contribution calendar — the green square heatmap — directly in your README. It is the canonical visual proof of coding consistency, showing at a glance how regularly you contribute code over the past year. This guide covers multiple approaches for embedding a contribution grid, including the activity graph service (for a 31-day chart) and the full-year calendar available through the GitHub Metrics project.
Quick Setup Steps
- 1
Step 1: Open your GitHub profile repository and edit README.md.
- 2
Step 2: Add the activity graph for a 31-day contribution grid: [](https://github.com/YOUR_USERNAME)
- 3
Step 3: Replace YOUR_USERNAME with your GitHub handle.
- 4
Step 4: Enable 'Include private contributions on my profile' in GitHub Settings to fill in private repo activity.
- 5
Step 5: For a full-year calendar, set up lowlighter/metrics with plugin_calendar: yes in your GitHub Actions workflow.
What Is the Contribution Grid?
GitHub's contribution grid (also called the contribution calendar or activity heatmap) shows 52 weeks of daily contribution data as a grid of colored squares. Squares darken as contribution counts increase for that day. It is the most-recognized GitHub visualization and immediately communicates both activity level and consistency.
Embedding this in your README makes it visible above the fold rather than requiring visitors to scroll down your profile page. For developers with impressive contribution records — particularly long streaks or high-density periods of activity — this placement can significantly strengthen the first impression your profile makes.
How to Embed the Contribution Grid
Option 1: Activity graph (31-day view, no setup):
[](https://github.com/YOUR_USERNAME)
Option 2: Full-year calendar via GitHub Metrics (requires Actions setup):
In your .github/workflows/metrics.yml, add:
plugin_calendar: yes
plugin_calendar_limit: 1
Then reference the generated metrics.svg in your README.
Option 3: Streak stats (shows longest streak + current streak):
[](https://git.io/streak-stats)
The streak stats card is the lightest option and communicates the most important derived metric from the contribution grid — whether you code consistently.
Customizing the Contribution Grid
For the activity graph (Option 1), customize the colors to match your profile palette:
color: Line and dot color (hex without#)line: Line color (overridescolorfor the line specifically)point: Data point dot colorbg_color: Background colortheme: Use a preset theme instead of individual colorsarea=true: Fill the area under the line for a more dramatic effecthide_border=true: Remove card border for a cleaner embedded look
For consistency with other widgets in your profile, use the same theme across all your widgets. If your profile uses tokyonight for stats and streak cards, use theme=tokyo-night for the activity graph (note the hyphen difference between the two services).
Troubleshooting the Contribution Grid
If the activity graph appears with a very flat line (few tall bars), this reflects your actual public contribution history. Large gaps in the graph correspond to days with no public commits, merged PRs, or other counted activities. Enable private contributions in your GitHub profile settings to make private repo activity visible.
If the image renders but shows no data at all, verify your GitHub username is correct in the URL and that you have made at least some public contributions in the past 31 days. Brand-new accounts may show an empty graph initially.
For the GitHub Metrics full-year calendar option, ensure the plugin_calendar: yes parameter is in your workflow and that the METRICS_TOKEN secret has the read:user scope. The calendar plugin reads your contribution data and renders it as a labeled grid within the metrics SVG.
Frequently Asked Questions
How do I embed a GitHub contribution grid in my README?
Use the activity graph service: `[](https://github.com/YOUR_USERNAME)`. For a full-year calendar, set up the lowlighter/metrics GitHub Action with plugin_calendar: yes and reference the generated metrics.svg in your README.
Is the contribution grid widget free?
Yes. Both the github-readme-activity-graph service and the lowlighter/metrics project are free and open source. The activity graph requires no setup. The GitHub Metrics project requires a GitHub Actions workflow and a personal access token, both free for public repositories.
Why does my contribution grid show gaps?
Gaps represent days with no public GitHub contributions. If you work primarily in private repositories, enable 'Include private contributions on my profile' in GitHub Settings → Profile. This makes private commits appear in your contribution graph and therefore in any widget that reads public contribution data.
What is the difference between the activity graph and GitHub's native contribution graph?
GitHub's native contribution graph (shown on your profile page below your README) shows 52 weeks of history. The github-readme-activity-graph shows the most recent 31 days as a bar/line chart. The lowlighter/metrics plugin_calendar shows the full year as a labeled calendar grid — closest to the native GitHub view.
From Our Blog
- Complete Guide to GitHub Badges for Your README
Learn how to add shields.io badges, GitHub stats cards, and tool badges to your GitHub profile README. Includes ready-to-use code for 50+ popular technologies.
- Best GitHub README Widgets and Tools: The Complete 2026 List
A curated list of the best GitHub profile README widgets — from snake animations to Spotify players, stats cards to 3D contribution graphs. Includes setup instructions for each.
- How to Add GitHub Stats Cards to Your README (2026 Guide)
Step-by-step guide to adding GitHub stats cards, language cards, streak stats, and WakaTime cards to your GitHub profile README using github-readme-stats.
Generate Your GitHub Profile README
Generate a GitHub profile README featuring GitHub Contribution Grid with AI
Try It Free — No Sign UpMore Widget Guides
How to Add Spotify Now Playing
Step-by-step guide to adding Spotify Now Playing to your GitHub README
How to Add WakaTime Coding Stats
Step-by-step guide to adding WakaTime Coding Stats to your GitHub README
How to Add Snake Contribution Animation
Step-by-step guide to adding Snake Contribution Animation to your GitHub README
How to Add Profile Views Counter
Step-by-step guide to adding Profile Views Counter to your GitHub README
How to Add Typing SVG Animation
Step-by-step guide to adding Typing SVG Animation to your GitHub README
How to Add GitHub Streak Stats
Step-by-step guide to adding GitHub Streak Stats to your GitHub README