How to Add LeetCode Stats to Your GitHub Profile README
Displaying your LeetCode stats on your GitHub profile demonstrates algorithmic problem-solving ability — a key signal for roles that involve technical interviews, systems thinking, or competitive programming. A strong LeetCode record (particularly solved hard problems and a high acceptance rate) tells recruiters and collaborators that you can reason about algorithms under pressure. This guide covers the KnlnKS/leetcode-stats widget, which renders your stats as a card using only your LeetCode username.
Quick Setup Steps
- 1
Step 1: Ensure your LeetCode profile is set to public in Account Settings → Privacy.
- 2
Step 2: Open your GitHub profile repository and edit README.md.
- 3
Step 3: Add the LeetCode card: 
- 4
Step 4: Replace YOUR_USERNAME with your LeetCode username (case-sensitive).
- 5
Step 5: Optionally add ext=activity for a recent submission chart, then commit and push.
What Is the LeetCode Stats Widget?
The leetcode-stats card displays your total problems solved broken down by difficulty (Easy/Medium/Hard), your global ranking, acceptance rate, and contribution points — all in a compact SVG card. It reads your data from LeetCode's public API using just your username, with no authentication required on your end.
LeetCode stats are particularly valuable to include if you are targeting roles in competitive technology companies where algorithm interviews are standard (FAANG, trading firms, competitive programming-adjacent roles). For other roles, the stats are a positive signal but carry less weight than demonstrated project work.
How to Add LeetCode Stats
Add this to your README, replacing YOUR_LEETCODE_USERNAME:

Alternative service (KnlnKS/leetcode-stats):

Key parameters for the jacoblin.cool service:
theme:dark,light,nord,forest,unicornfont: Any Google Font name (e.g.,Karma,Baloo_2,Nunito)ext:activity(adds a recent activity chart),heatmap(adds a submission heatmap),contest(adds contest rating history)border: Set to0to remove the card borderanimation: Set to0to disable card entrance animation
Customizing the LeetCode Stats Card
For a card that matches your GitHub profile theme, use:
- Dark profiles:
theme=darkortheme=nord - Light profiles:
theme=lightortheme=forest
The ext=activity parameter adds a recent submission chart showing your problem-solving frequency over the past few months. This is a strong addition if you practice consistently — it shows not just total numbers but recent engagement.
For a more compact layout, you can link the card to your LeetCode profile page:
[](https://leetcode.com/YOUR_USERNAME)
Position the LeetCode card alongside other credential stats — Stack Overflow reputation, GitHub stats — for a credibility-focused stats row in your profile.
Troubleshooting LeetCode Stats
If the card shows an error or 'User not found', verify your LeetCode username is spelled exactly as it appears on your profile page (case-sensitive). If you recently created your account, LeetCode's API may take a few days to return data — new accounts with very few submissions may show zero counts.
If the card loads but shows stale data, LeetCode's public API has rate limits and the service caches results. The cache typically expires within a few hours and refreshes automatically.
For accounts with a private LeetCode profile, the public API may not return all statistics. Check your LeetCode privacy settings — under Account Settings → Privacy → Profile → make sure your 'Solution count' is set to public for the full card to render correctly.
Frequently Asked Questions
How do I add LeetCode stats to my GitHub README?
Add this to your README: ``. Replace YOUR_LEETCODE_USERNAME with your LeetCode profile username. No API key or authentication needed — the card reads from LeetCode's public API.
Is the LeetCode stats card free?
Yes. Both the jacoblin.cool and KnlnKS/leetcode-stats services are free and open source. No account connection, API key, or LeetCode premium is required. The cards use LeetCode's public GraphQL API which is accessible without authentication.
Why are my LeetCode stats showing as 0 or empty?
Check that your LeetCode username is correct (case-sensitive). Verify your LeetCode profile is set to public in Account Settings → Privacy. New accounts or accounts with very few submissions may show minimal data. The API can also experience delays of a few hours after new submissions.
Should I add LeetCode stats to my GitHub profile?
Yes, if you are targeting roles where algorithm interviews are common (major tech companies, trading firms, software engineering interviews). The stats are most valuable when you have solved 100+ problems with a meaningful percentage of medium and hard problems. For other roles, prioritize project demonstrations over algorithm metrics.
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 LeetCode Stats 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