README Generator

How to Add a Top Languages Card to Your GitHub Profile README

The top languages card shows which programming languages appear most in your public GitHub repositories, displayed as a visual breakdown. It is commonly placed beside the GitHub stats card to show not just that you code, but what you code in. This guide uses the anuraghazra/github-readme-stats project (same as the stats card) and covers all four layout options, how to filter out skewing repositories, and how to hide languages that don't reflect your actual expertise.

Quick Setup Steps

  1. 1

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

  2. 2

    Step 2: Add the top languages image tag: ![Top Languages](https://github-readme-stats.vercel.app/api/top-langs/?username=YOUR_USERNAME&layout=compact&theme=tokyonight)

  3. 3

    Step 3: Add hide= parameter to exclude markup languages (html, css) if you are a backend or systems developer.

  4. 4

    Step 4: Add exclude_repo= parameter to exclude forked or tutorial repositories that skew your language breakdown.

  5. 5

    Step 5: Commit and push. Pair with the stats card in a two-column HTML div for a professional side-by-side layout.

What Is the Top Languages Card?

The top languages card analyzes your public repositories and counts bytes of code by language. It then displays the top languages as a percentage breakdown in your chosen layout format. The card is powered by the same anuraghazra/github-readme-stats service as the stats card — no additional setup required.

Important caveat: the card measures bytes of code, not time spent or proficiency. A forked repository with 50,000 lines of Java will skew your chart toward Java even if you only made one small change. For an accurate representation, you will want to exclude certain repositories and hide certain languages — both covered below.

How to Add the Top Languages Card

Add this to your README, replacing YOUR_USERNAME:

![Top Languages](https://github-readme-stats.vercel.app/api/top-langs/?username=YOUR_USERNAME&layout=compact&theme=tokyonight)

Available layouts (set with &layout=):

  • default — vertical bar chart, one row per language
  • compact — smaller card, fits better beside the stats card
  • donut — pie/donut chart visualization
  • donut-vertical — vertical donut variant
  • pie — standard pie chart

For a two-column layout with the stats card:

<div align="center">
  <img src="https://github-readme-stats.vercel.app/api?username=YOUR_USERNAME&theme=tokyonight&count_private=true" height="150" />
  <img src="https://github-readme-stats.vercel.app/api/top-langs/?username=YOUR_USERNAME&layout=compact&theme=tokyonight" height="150" />
</div>

Filtering the Top Languages Card

To hide specific languages that don't represent your skills, use the hide parameter:

![Top Languages](https://github-readme-stats.vercel.app/api/top-langs/?username=YOUR_USERNAME&hide=html,css,jupyter+notebook&layout=compact)

To exclude specific repositories that skew your results:

![Top Languages](https://github-readme-stats.vercel.app/api/top-langs/?username=YOUR_USERNAME&exclude_repo=repo1,repo2,repo3&layout=compact)

To limit to a specific number of languages:

![Top Languages](https://github-readme-stats.vercel.app/api/top-langs/?username=YOUR_USERNAME&langs_count=6&layout=compact)

The default is 5 languages. Common hides for backend developers include html and css. Common excludes include forked repositories, archived projects, or repositories from learning courses.

Troubleshooting the Top Languages Card

If the card shows languages you don't use (like Jupyter Notebook for data science tools or Makefile for build scripts), add them to the hide parameter. If a large forked repository dominates your chart, add it to exclude_repo.

If the card shows 'No language data found', your public repositories may have no detectable language content, or all repositories may have the language detection disabled. Add the ? query parameter structure correctly — the top-langs endpoint uses /api/top-langs/ (with trailing slash) not /api/top-langs.

For the compact layout to align correctly with the stats card in a two-column div, set matching height attributes on both img tags. Values between 150 and 200 typically work well for most screen sizes.

Frequently Asked Questions

How do I add a top languages card to my GitHub README?

Add this to your README: `![Top Languages](https://github-readme-stats.vercel.app/api/top-langs/?username=YOUR_USERNAME&layout=compact&theme=tokyonight)`. The compact layout works best beside the stats card. Use the hide parameter to exclude markup languages if you are primarily a backend developer.

Why does my top languages card show the wrong languages?

The card counts bytes of code by language across all your public repositories. Forked repositories, archived projects, or large tutorial repos can skew the results heavily. Use exclude_repo=repo1,repo2 to remove specific repositories, and hide=html,css to exclude markup languages from the breakdown.

Is the top languages card free?

Yes. It uses the same anuraghazra/github-readme-stats service as the stats card — open source, no API key required, and hosted on a public Vercel endpoint. The service is free for personal use and the project has extensive self-hosting documentation if you need guaranteed uptime.

Does the top languages card include private repositories?

No. The top languages card only analyzes public repositories by default. Unlike the stats card which has a count_private parameter for contribution counts, there is no equivalent for language data — the GitHub API does not expose private repository language details without elevated permissions.

From Our Blog

Generate Your GitHub Profile README

Generate a GitHub profile README featuring Top Languages Card with AI

Try It Free — No Sign Up