How to Use Uptime Badges in Your GitHub README
An uptime badge shows your monitor's live availability percentage as a small SVG image. It updates automatically — no rebuilds, no manual updates. Here's how to add one to your README, docs, or website.
Open source projects and public APIs often display status badges in their README — build passing, coverage percentage, latest version. An uptime badge adds one more signal: "this service is running." It's a trust indicator that requires no maintenance once set up.
Step 1: Find your badge URL
Each PingBase monitor has a unique badge URL. To find it:
- Log into app.pingba.se
- Open a monitor
- Click Badge in the monitor detail view
- Copy the badge URL or the ready-to-use Markdown snippet
The badge URL format is:
https://app.pingba.se/badge/YOUR_MONITOR_ID
This returns a live SVG image. Every time it's loaded, it reflects the current uptime percentage for that monitor over the last 30 days.
Step 2: Add to your GitHub README
In Markdown, embed an image with a link:
# README.md
[](https://pingba.se/status/YOUR_STATUS_PAGE_SLUG)
This renders as a clickable badge — clicking it takes users to your public status page where they can see uptime history and any active incidents.
The badge displays as:
Badge styles
PingBase badges adapt their color automatically based on your current uptime:
| Uptime range | Badge color | Label example |
|---|---|---|
| 99.9% – 100% | green | uptime | 99.9% |
| 99% – 99.9% | yellow | uptime | 99.3% |
| 95% – 99% | orange | uptime | 97.1% |
| Below 95% | red | uptime | 91.2% |
| Monitor is currently down | dark red | status | down |
Embedding in HTML (websites, docs)
For HTML pages — your docs site, landing page, or product website — use an <img> tag wrapped in a link:
# HTML embed
<a href="https://pingba.se/status/YOUR_SLUG">
<img src="https://app.pingba.se/badge/YOUR_MONITOR_ID"
alt="Uptime status"
height="20" />
</a>
For Next.js or React, use the <img> directly or Next's Image component with unoptimized to preserve the live SVG:
import Image from 'next/image';
<a href="https://pingba.se/status/YOUR_SLUG">
<Image
src="https://app.pingba.se/badge/YOUR_MONITOR_ID"
alt="Uptime"
width={100}
height={20}
unoptimized
/>
</a>
Multiple monitors, one README section
If you have multiple components to display — API, dashboard, webhooks — you can show several badges in a row:
# README.md — multiple badges
## Status [](https://pingba.se/status/your-slug) [](https://pingba.se/status/your-slug) [](https://pingba.se/status/your-slug)
This renders as a row of badges, each labeled with the monitor name, each linking to your status page. Users can see at a glance which components are healthy.
Caching behaviour
Badge SVGs from PingBase are served with short cache headers — they refresh within a few minutes of a status change. GitHub's CDN caches badge images for a few minutes on their end as well, which is normal behaviour for all badge providers (including Shields.io).
This means: if your service goes down, the badge will reflect that within a few minutes. It's not real-time to the second, but it's accurate enough for the purpose — giving README readers a current sense of your service's health.
Good places to put uptime badges
- GitHub README — top section, near build/test status badges
- Documentation site — in the header or a "Service status" section
- Landing page — near the pricing section or in the footer
- API reference docs — next to the base URL, showing API availability
- Developer portal — on the dashboard or home page
The badge works best when it's linked to your full status page. That way, curious users who click it see the full uptime history and any active incidents — not just a number.
Add an uptime badge to your README
Set up a free monitor on PingBase and get your badge URL in under 5 minutes.
Get started free →