Change your LeetCode username from your account settings
You can change your LeetCode username by going to your account settings, finding the username field, and saving the new name. LeetCode allows you to change your username once every 30 days. The change takes effect when ready across your profile, submissions, and any public discussions you participate in.
Your old username will not be reserved for you after the change, so someone else could claim it. If you think you might want to use your original username again later, consider whether you want to change it at all.
Key Takeaways
- Log into your LeetCode account and navigate to Settings to find the username field.
- You can change your username once every 30 days, and the change is when ready.
- Your old username becomes available for others to use after you change it.
- Your new username must be between 1 and 20 characters and can include letters, numbers, hyphens, and underscores.
- Changing your username does not affect your problem-solving history, points, or badges.
Step-by-step: accessing your account settings
Start by logging into your LeetCode account. Click the profile icon in the top right corner of the page — it usually shows your current username or a default avatar. A dropdown menu will appear with several options.
Select "Settings" from that menu. You will land on a page with tabs or sections on the left side. Look for "Account" or "Profile" — the exact label depends on when your account was created, but it is always the first or second option. Click it to see your account details.
Finding and editing the username field
Once you are in the Account section, scroll down until you see a field labeled "Username". This field shows your current username and is editable. Click directly on the field or look for an "Edit" button next to it.
Delete your current username and type the new one. LeetCode will tell you when ready if the name is already taken or if it violates the character rules. The new username must be 1 to 20 characters long and can contain letters (uppercase and lowercase), numbers, hyphens, and underscores. Spaces and special characters like periods or commas are not allowed.
Saving your new username
After you type your new username, look for a "Save" or "Update" button near the username field. Click it to confirm the change. LeetCode will show a confirmation message — either that the change was successful or that something went wrong.
If you see an error, the most common reasons are that the username is already taken, you changed your username fewer than 30 days ago, or the name contains characters LeetCode does not allow. If the change succeeds, refresh the page to see your new username appear throughout your profile.
What happens to your old username
Your old username is released when ready and becomes available for anyone else to claim. This means if you change from "john_doe" to "johndoe", another user could register "john_doe" as their new username within minutes.
Your problem-solving history, accepted solutions, points, badges, and all other account data remain exactly the same. Only the name changes. Anyone who bookmarked your profile using your old username will see a "user not found" message, but your profile itself is still there under your new name.
Waiting period between username changes
LeetCode enforces a 30-day waiting period between username changes. If you try to change your username again before 30 days have passed since your last change, you will see a message telling you when you can change it next.
This limit applies to each account separately. If you have multiple LeetCode accounts, each one has its own 30-day timer. There is no way to bypass this waiting period, so plan your username change carefully if you think you might want to change it again soon.
Troubleshooting common problems
If you cannot find the username field, make sure you are logged in and in the Settings section under Account. Some older accounts may have a slightly different layout, but the username field is always in account settings, never elsewhere.
If you see "Username already taken" when you try to save, the name you chose is in use by another account. Try a variation — add a number, a hyphen, or an underscore. If you see "You can change your username again in X days", you have already changed it recently and must wait. If the save button does not respond, try refreshing the page and logging in again.
Frequently Asked Questions
Can I change my username back to my old one after I change it?
Not when ready. Your old username becomes available for others to use, so someone else might claim it. You could change back to it only if it is still unclaimed and you wait 30 days after your first change. It is safer to choose a username you plan to keep.
Does changing my username affect my ranking or rating?
No. Your LeetCode rating, problem-solving count, points, and all badges stay the same. Only the name displayed on your profile changes. Your ranking position is based on your account, not your username.
What if I forgot my username?
Log into your LeetCode account using your email address and password. Once you are logged in, your username appears in the top right corner and in your Settings. You do not need to remember it to access your account.
Can I use spaces or special characters in my new username?
No. LeetCode usernames can only contain letters, numbers, hyphens, and underscores. Spaces, periods, commas, and other special characters are not allowed. The username must also be between 1 and 20 characters long.
Will my old username show up in my problem submissions?
No. All your past submissions will display your new username. There is no way to see your old username in your submission history after you change it.