GitHub treats usernames as case insensitive, so it does not matter whether you type uppercase or lowercase letters

When you create a GitHub account with the username "JohnSmith", you can log in as "johnsmith", "JOHNSMITH", or any mix of upper and lowercase letters. GitHub converts everything to lowercase behind the scenes. The same applies to mentions, links, and repository URLs — @JohnSmith and @johnsmith point to the same person.

This is different from how some other platforms work. On Twitter or Discord, for example, usernames are case sensitive, meaning "JohnSmith" and "johnsmith" would be two different accounts. GitHub's approach means you do not have to remember the exact capitalization someone used when you tag them in a comment or search for their profile.

Your display name — the name that appears on your profile — is separate from your username and can use any capitalization you want. So your username might be "johnsmith" while your display name reads as "John Smith" or "JOHN SMITH". Only the username itself is case insensitive.

Key Takeaways

  • GitHub usernames are case insensitive, so logging in with any mix of uppercase and lowercase letters will work.
  • Links and mentions work the same way — @JohnSmith and @johnsmith both point to the same account.
  • Your display name is separate from your username and can use any capitalization you choose.
  • Repository URLs also ignore case, so github.com/johnsmith/myproject and github.com/JohnSmith/myproject are the same.
  • When you create an account, GitHub shows you the username in the capitalization you entered, but the system treats it as lowercase.

How this affects logging in and finding accounts

When you log in to GitHub, you can type your username in any case. If your account is "JohnSmith", entering "johnsmith", "JOHNSMITH", or "jOhNsMiTh" will all work. GitHub does not reject the login because of capitalization — it only checks that the username and password match.

The same is true when you search for someone's profile or type their username in a mention. If you want to tag a colleague in a pull request comment, you can type @johnsmith even if their account shows as @JohnSmith. GitHub will find the right person because it ignores case when matching usernames.

This also means you cannot create two accounts that differ only in capitalization. If "JohnSmith" already exists, you cannot register "johnsmith" as a separate account — GitHub will tell you the username is taken.

What happens with repository URLs and links

Repository URLs work the same way. A repository owned by "JohnSmith" can be reached at github.com/johnsmith/myproject, github.com/JohnSmith/myproject, or any other capitalization. GitHub redirects all of these to the same place.

When you clone a repository using git, the URL you use does not have to match the capitalization on GitHub's website. You can use lowercase in your terminal command even if the owner's username appears in mixed case on the site. Git will still find the correct repository.

Links you share with others work the same way. If you send someone a link to github.com/JOHNSMITH/myproject, it will take them to the same repository as github.com/johnsmith/myproject. The capitalization in the URL does not matter.

How GitHub displays your username

When you sign up for GitHub, the username you enter is stored in the capitalization you typed. So if you register as "JohnSmith", that is how it appears on your profile and in your public URL. Other people will see your username in that form when they visit your profile or look at your contributions.

However, GitHub's backend system treats it as lowercase for all matching and lookup purposes. This is why you can log in with any capitalization, and why someone can mention you with different capitalization and still reach your account.

If you want to change how your username appears, you cannot just change the capitalization — GitHub does not allow that. You would have to change your entire username, which affects all your links, repositories, and how people find you. Most people keep their original username capitalization to avoid breaking links.

What this means for your GitHub profile and repositories

Your profile URL is based on your username. If your username is "JohnSmith", your profile lives at github.com/JohnSmith. This URL is permanent and tied to your account. Changing your username changes this URL, which can break links people have saved or shared.

All your repositories inherit the capitalization from your username. A repository you create will have a URL like github.com/JohnSmith/myproject. Even though GitHub treats the username as case insensitive, the URL displays in the capitalization you chose when you created your account.

If you collaborate with others or work in organizations, the case insensitivity means there is no confusion about who is who. Whether someone types your username in all caps, all lowercase, or mixed case, GitHub knows exactly which account they mean.

Differences between usernames and organization names

GitHub organization names follow the same case insensitivity rule as usernames. You can type an organization name in any capitalization when accessing it, and GitHub will find the right organization. The URL displays in whatever capitalization the organization chose, but the system treats it as case insensitive behind the scenes.

Repository names, on the other hand, are case sensitive on Linux and Mac systems but case insensitive on Windows. This is because of how the underlying operating systems handle file names. A repository named "MyProject" and one named "myproject" would be treated as different repositories on Linux but the same on Windows. This can cause problems if you work across different operating systems, so it is best to pick one capitalization and stick with it.

Frequently Asked Questions

Can I change my username capitalization without changing my entire username?

No. GitHub does not allow you to change only the capitalization of your username. If you want different capitalization, you have to change your entire username, which updates all your profile links and repository URLs. This can break existing links, so most people avoid doing this.

Will @johnsmith and @JohnSmith notify the same person?

Yes. GitHub treats both mentions as pointing to the same account, so either capitalization will notify the person and link to their profile. The system does not distinguish between them.

What if I forget the capitalization of someone's username?

It does not matter. You can type their username in any capitalization when searching for them, mentioning them, or visiting their profile. GitHub will find the right person regardless of how you capitalize it.

Do I need to use the exact capitalization when cloning a repository?

No. You can use any capitalization in the git clone command, and it will work. Git and GitHub handle the case insensitivity, so the URL works whether you type it in uppercase, lowercase, or mixed case.

Are GitHub organization names also case insensitive?

Yes. Organization names follow the same case insensitivity rule as usernames. You can access an organization using any capitalization, and GitHub will route you to the correct organization.