README Generator

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. 1

    Step 1: Ensure your LeetCode profile is set to public in Account Settings → Privacy.

  2. 2

    Step 2: Open your GitHub profile repository and edit README.md.

  3. 3

    Step 3: Add the LeetCode card: ![LeetCode Stats](https://leetcard.jacoblin.cool/YOUR_USERNAME?theme=dark)

  4. 4

    Step 4: Replace YOUR_USERNAME with your LeetCode username (case-sensitive).

  5. 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:

![LeetCode Stats](https://leetcard.jacoblin.cool/YOUR_LEETCODE_USERNAME?theme=dark&font=Karma&ext=activity)

Alternative service (KnlnKS/leetcode-stats):

![LeetCode Stats](https://leetcode-stats-six.vercel.app/api?username=YOUR_LEETCODE_USERNAME&theme=dark)

Key parameters for the jacoblin.cool service:

  • theme: dark, light, nord, forest, unicorn
  • font: 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 to 0 to remove the card border
  • animation: Set to 0 to disable card entrance animation

Customizing the LeetCode Stats Card

For a card that matches your GitHub profile theme, use:

  • Dark profiles: theme=dark or theme=nord
  • Light profiles: theme=light or theme=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:

[![LeetCode Stats](https://leetcard.jacoblin.cool/YOUR_USERNAME?theme=dark)](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: `![LeetCode Stats](https://leetcard.jacoblin.cool/YOUR_LEETCODE_USERNAME?theme=dark)`. 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

Generate Your GitHub Profile README

Generate a GitHub profile README featuring LeetCode Stats with AI

Try It Free — No Sign Up