How to Add a Visitor Badge to Your GitHub Profile README
A visitor badge shows a running count of how many times your GitHub profile has been viewed. It functions like a hit counter, displaying the number on a styled badge that updates with each page load. Adding one takes a single line of markdown with no registration or accounts required. This guide covers the visitor-badge.laobi.icu service (formerly jwenjian/visitor-badge), one of the most widely used options, along with the komarev.com alternative covered in the profile-views-counter guide.
Quick Setup Steps
- 1
Step 1: Open your GitHub profile repository and edit README.md.
- 2
Step 2: Add the visitor badge: 
- 3
Step 3: Replace YOUR_USERNAME with your GitHub handle (it appears twice in the page_id).
- 4
Step 4: Optionally customize with left_color, right_color, and left_text parameters.
- 5
Step 5: Commit and push. Visit your profile to verify the counter renders and increments.
What Is a Visitor Badge?
A visitor badge is a dynamic image that tracks and displays how many times a specific page or asset has been loaded. On GitHub profiles, it counts every time the README is rendered — by human visitors, search engine crawlers, link preview services, and automated bots alike. The total count is therefore a rough approximation of interest rather than a precise visitor metric.
The badge renders as a standard shields.io-style badge, making it visually consistent with other badges in your README. It is most meaningful for profiles with substantial traffic from popular repositories or a strong developer community presence. For new profiles, an early low count may be more distracting than useful.
How to Add a Visitor Badge
Add this to your README, replacing YOUR_USERNAME with your GitHub username:

The page_id should be username.username for profile READMEs (which live in the username/username repository). For a repository-specific badge:

For a styled badge with labels:

Alternative option using komarev.com:

Customizing the Visitor Badge
The visitor-badge.laobi.icu service supports several customization parameters:
left_color: Background color of the label side (e.g.,gray,blue, or hex)right_color: Background color of the count sideleft_text: Custom label text (default: 'visitors')format: Set tosvg(default) orpng
For style options matching shields.io badges, use the komarev.com service instead, which supports flat, flat-square, plastic, and for-the-badge styles. The for-the-badge style matches the large tech stack badges commonly used in README skill sections.
For a minimal integration, place the badge in the top-right corner of your profile header, formatted as a small flat badge. For a more prominent display, use for-the-badge style in your profile's stats section.
Troubleshooting the Visitor Badge
If the badge shows a broken image or error, verify the page_id format is correct: username.username for profile repositories. The most common mistake is using only the username or omitting the second part.
If the count appears stuck and is not incrementing, it may be a caching issue on GitHub's end. GitHub caches images from external sources for several minutes — the count is updating server-side but you may not see the latest number immediately.
If the visitor-badge.laobi.icu service is unavailable (it has experienced intermittent outages), switch to the komarev.com alternative: https://komarev.com/ghpvc/?username=YOUR_USERNAME. Both services track counts independently, so switching will start a fresh count.
Frequently Asked Questions
How do I add a visitor badge to my GitHub README?
Add this line to your README: ``. Replace YOUR_USERNAME with your GitHub handle (appears twice in the page_id). The count starts at zero and increments on every page load.
Is the GitHub visitor badge free?
Yes. Both visitor-badge.laobi.icu and komarev.com provide free visitor counters with no account registration. The services are community-maintained and free for personal and open source use.
Why is my visitor badge count not increasing?
GitHub caches external images for several minutes, so you may not see the incremented count immediately. The server-side count is tracking correctly — try opening your profile in a private/incognito window or waiting 5-10 minutes before refreshing. Also check the page_id format is correct.
Does a visitor badge count bots and crawlers?
Yes. Visitor badges count all requests to the badge URL, including search engine crawlers, link preview services, and automated bots. The count is therefore higher than the number of human visitors. Consider this when deciding whether to display the badge — a very high count includes significant bot traffic.
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 Visitor Badge 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