GitHub Cards API is a lightweight, serverless utility that allows you to generate beautifully customizable GitHub profile cards. Built using Cloudflare Workers, this project offers fast, globally distributed performance with minimal overhead. It supports a variety of themes, flexible layout options, and custom styling — making it perfect for embedding in your README, portfolio, or anywhere you want.
- ✨ Theme Support – Multiple built-in themes and a powerful
custom
mode for full design control. - 🎨 Card Customization – Tweak font size, color, alignment, padding, shadows, and more.
- 🖼️ Live Preview GUI – Comes with an interactive app to preview and generate your card with ease.
- ⚡ Serverless & Fast – Powered by Cloudflare Workers with optional KV-based caching for performance.
- 🌍 Open Source & Extensible – Contributions are welcome! Easily extend the card options or renderer logic.
This project started as a learning experiment while transitioning from traditional Node.js + Express apps to modern serverless deployments. It demonstrates how Cloudflare Workers can be used to build and deploy scalable, high-performance APIs.
Try the web-based Card Generator to build and preview your GitHub Cards without writing any code:
🔗 Live Generator: https://github-cards-worker.akanshsirohi-dev.workers.dev/app
Use the form to select a card type and theme, tweak custom colors or gradients, then generate and download your SVG card instantly.
Access all available cards and their respective options at:
https://github-cards-worker.akanshsirohi-dev.workers.dev/
- Select a Card type and Theme.
- (Optional) For the custom theme, adjust the card, background, font, and shadow colors or gradients.
- Click Generate card.
- Preview your card, download the SVG, or copy the Markdown/HTML embed code.

<img src="https://github-cards-worker.akanshsirohi-dev.workers.dev/card-name" alt="Card" />
All cards are managed via help.js
. A few popular examples include:
Card Name | Example |
---|---|
programming-facts |
 |
motivational-quote |
 |
programming-quote |
 |
bhagavad-geeta-card |
 |
fun-facts |
 |
space-facts |
 |
my-card |
 |
my-card
: Special card to show the customized text only.
👉 For the full list, visit https://github-cards-worker.akanshsirohi-dev.workers.dev
All themes are created using HTML and rendered via Satori.
custom
(fully customizable)techy
neon_horizon
galactic_dusk
aurora_borealis
retro_block
rainbow_vortex
endless_constellation
lemonade
galaxy
vintage
cyber_grid
digital_rain
Parameter | Description | Default |
---|---|---|
card_color |
Card's main background color or a Base64‑encoded CSS gradient string | #ffffff |
font_color |
Text color | #000000 |
bg_color |
Outer background color or a Base64‑encoded CSS gradient string | #ffffff |
shadow_color |
Card shadow color | #00000000 |
google_font |
Custom google font | none |
text_align |
Text alignment (Top/Middle/Bottom + Left/Middle/Right). Available: tl , tm , tr , ml , mm , mr , bl , bm , br |
tl |
outer_pad |
Outer card padding in pixels. | 15 |
inner_pad |
Inner card padding in pixels. | 15 |
font_size |
Font size. | 12 |
card_width |
Width of the card in pixels. | 400 |
card_min_height |
Minimum height of the card in pixels. | 100 |
Gradient Support
card_color
andbg_color
accept linear or radial gradients. Because commas & parentheses are not URL‑safe, supply the gradient as a URL‑safe Base64 string. Use https://www.base64encode.org/ (or any encoder) and copy the Encode (URL‑Safe) output.# Original CSS linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%); # URL‑safe Base64 bGluZWFyLWdyYWRpZW50KDkwZGVnLHJnYmEoMiwgMCwgMzYsIDEpIDAlLCByZ2JhKDksIDksIDEyMSwgMSkgMzUlLCByZ2JhKDAsIDIxMiwgMjU1LCAxKSAxMDAlKTs
Then call the API:



- Fork this repository.
- Add your card in the
src/cards
directory. Refer to existing cards for guidance. - If needed, add a file inside the
data
directory (supports English & Hindi). - Register your route in
index.js
. - Update both
help.js
and this README. - Ensure your dataset contains at least ~100 entries.
- Submit a pull request.
- Test locally:
wrangler dev
- Fork this repository.
- Open
themes.js
. - Add your theme inside the exported
HTML_THEMES
object. - Use inline styles & valid Satori-compatible HTML.
- Reference
{{card_content}}
properly. - Update
help.js
and the README. - Submit a pull request.
- Code should be clean and minimal.
- Themes must be visually distinct.
- Cards must be useful, interesting, or educational.
- Avoid copyright violations.
- Built with Cloudflare Workers for speed and scalability.
- Uses Satori for HTML-to-image rendering.
- All assets (fonts, images) are served via Cloudflare Worker assets.
- Cards and themes are maintained centrally in
help.js
andthemes.js
.
✨ Feel free to create a PR and contribute a card or theme! Let’s build something cool together