Generate a beautiful, customizable LeetCode stats card for your GitHub README or portfolio — just like GitHub Readme Stats, but for LeetCode!
Add this to your GitHub README or any markdown file:
[](https://leetcode.com/YOUR_USERNAME)Or use it as an <img> tag in your portfolio:
<img
src="https://leetcode-stats-card-opal.vercel.app/api/card?username=YOUR_USERNAME"
alt="LeetCode Stats"
/>| Dark | Light | Transparent |
|---|---|---|
![]() |
![]() |
![]() |
[](https://leetcode.com/YOUR_USERNAME)
[](https://leetcode.com/YOUR_USERNAME)
[](https://leetcode.com/YOUR_USERNAME)| Parameter | Type | Default | Description |
|---|---|---|---|
username |
string | required | Your LeetCode username |
theme |
string | dark |
Card theme: dark, light, transparent |
hide |
string | — | Hide specific stats, comma separated |
bg |
hex | — | Custom background color (without #) |
accent |
hex | — | Custom accent/value color (without #) |
You can choose which stats to display in the 2×2 grid using the hide parameter.
Available stats:
| Key | Description |
|---|---|
platformrank |
Your global LeetCode platform rank |
contestrating |
Your contest rating |
globalrank |
Your global contest rank |
reputation |
Your reputation points |
streak |
Your current streak |
totalsolved |
Total problems solved |
Example — show only Platform Rank and Total Solved:
You can fully customize the card colors using hex values (without #):
Try the interactive card generator at: leetcode-stats-card-opal.vercel.app
- Next.js — framework
- Vercel — hosting & edge functions
- LeetCode GraphQL API — data source
- Pure SVG — zero dependencies for card generation
git clone https://github.com/sheeeuWu/leetcode-stats-card.git
cd leetcode-stats-card
npm install
npm run devOpen http://localhost:3000 to see the demo page.
The API will be available at:
http://localhost:3000/api/card?username=YOUR_USERNAME
MIT © saifaliCodes



