Developer

GitHub Badge Generator

Details

How to use GitHub Badge Generator

What the tool does, how to run it, and what to expect from the result.

How to make a shields-style README badge

Set a label (the grey left half), a message (the coloured right half), and the two colors. The badge SVG is rebuilt on every keystroke, with the segment widths estimated from the text so the padding matches the classic flat shields style.

You get the raw SVG plus ready-made Markdown and HTML snippets. Nothing is fetched from an external badge service.

  • Type the label, for example license, and the message, for example MIT.
  • Pick the label color (usually dark grey) and the message color from the presets, or type a hex.
  • Optionally add a short logo text such as npm, which is rendered bold inside the left segment.
  • Check the preview; the badge is 20 pixels tall with rounded corners.
  • Copy the SVG, save it into your repository, and reference it from your README rather than hotlinking a service.
Tips

Getting a better result out of GitHub Badge Generator

Specific settings and thresholds, not general advice.

  • This produces a static SVG, which means the badge says whatever you typed forever. A real "build passing" badge from a CI provider is a live endpoint that changes when the build breaks; a static one keeps claiming the build passes long after it stopped. Use this for things that do not change, such as a licence, a language, or a platform.
  • Nothing is fetched from shields.io. The SVG is assembled in your browser, so the badge keeps rendering if shields.io is down, does not add a third-party request to every README view, and does not leak your repo traffic to another service.
  • The badge width is estimated from a per-character width table (a lowercase l is 3 units, an M is 10) tuned to an 11-pixel Verdana-like face. It is close, but an unusual string can be a pixel or two loose, which shows up as slightly uneven padding.
  • Badge height is fixed at 20 pixels with a 3-pixel corner radius and a subtle top-down gradient, matching the classic shields.io flat style so it sits beside real shields without looking out of place.
  • Copy the SVG and commit it to your repo rather than hotlinking anything. That is the whole advantage of a local badge: one fewer external request, one fewer thing that can 404 in two years.
Limits

What GitHub Badge Generator does not do

The honest boundary, so you do not lose time finding it yourself.

  • Static badge only; it does not query CI, npm, or any live status.
  • Text-only logo, no real brand icons or SVG logos.
  • One style (flat, 20 pixels tall); no for-the-badge, plastic, or social variants.
  • No PNG export, only SVG, Markdown, and HTML.
At a glance

Who GitHub Badge Generator is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

Developers adding status badges to a README.

Ideal for

Using the github badge generator without installing anything or signing up.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

Does this badge update when my build fails?

No, and that is the most important thing to understand about it. It is a static SVG with your text baked in. A shields.io badge that says "build passing" is a live URL that your CI provider updates; this is a picture of one. Use it for facts that do not change (licence MIT, made with TypeScript, platform iOS) and use a real CI badge for anything that reports a status.

Does it call shields.io?

No. The SVG is generated by a function in your browser, with the widths estimated locally and the colors written directly into the markup. That means no third-party request in your README, nothing to rate-limit, and no dependency on a service that might change or go away.

Which format should I use in my README?

For GitHub, commit the SVG file to your repo and reference it from Markdown, so the badge renders even if you later go offline or the file moves. The generated Markdown and HTML snippets are there for convenience; the HTML one is useful for documentation sites that render raw HTML, and the raw SVG is what you actually want to save.

Why is the spacing slightly off on my badge?

Because the width is estimated, not measured. The generator uses a lookup table of approximate character advance widths for a Verdana-like 11-pixel font (narrow for i, j, l, wide for m, w, M, W) rather than rendering the text and measuring it. For ordinary words it is accurate to a pixel or two; unusual strings can look a little loose or tight.

Can I add a real logo, like the npm or GitHub icon?

Not an icon, only text. The logo field prepends a bold text label inside the left segment of the badge, which works for a short word such as npm or beta. Real brand icons would need the icon set embedded, and this tool keeps the SVG self-contained and dependency-free.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon