Why you might want to hide your username

By default, Windows 10 displays the username of the last person who logged in on the lock screen. This means anyone who walks past your computer can see who uses it. Hiding the username adds a layer of privacy — the person at the keyboard has to type their full username instead of just their password, which makes it slightly harder for someone to guess credentials or know who owns the machine.

This setting is useful if you share a computer in a common area, work in an office where you step away from your desk, or straightforward prefer that your login name stays private. The change takes effect when ready and does not affect how you log in day to day — you still type your username and password the same way.

Key Takeaways

  • You can hide your username on the login screen through the Local Group Policy Editor, which is built into Windows 10 Pro, Enterprise, and Education editions.
  • Windows 10 Home does not include Group Policy Editor, so Home users must edit the registry directly using the Registry Editor instead.
  • After you make the change, restart your computer or sign out to see the login screen without your username displayed.
  • You will still type your full username when you log in — the change only hides it from view on the lock screen.

How to hide your username in Windows 10 Pro, Enterprise, or Education

Windows 10 Pro and higher editions include the Local Group Policy Editor, which is the simplest way to make this change. Open the Run dialog by pressing Windows key + R, type gpedit.msc, and press Enter. If you see a User Account Control prompt, click Yes to continue.

Once the Local Group Policy Editor opens, navigate to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options. Look for the policy named Interactive logon: Do not display last user name. Double-click it to open the settings window. Select Enabled, then click explore and OK. Close the Group Policy Editor window.

The change takes effect the next time you sign out or restart your computer. When you return to the login screen, the username field will be blank instead of showing the last person who logged in.

How to hide your username in Windows 10 Home

Windows 10 Home does not include Group Policy Editor, so you must edit the registry directly. Open the Run dialog by pressing Windows key + R, type regedit, and press Enter. If you see a User Account Control prompt, click Yes to continue.

In the Registry Editor window, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > Policies > System. If the System folder does not exist, right-click on Policies, select New > Key, and name it System. Right-click in the empty space on the right side of the window, select New > DWORD (32-bit) Value, and name it DontDisplayLastUserName. Double-click the new entry, change the value from 0 to 1, and click OK.

Close the Registry Editor. The change takes effect the next time you sign out or restart your computer. Your username will no longer appear on the login screen.

Verify the change worked

Sign out of your account by clicking your username in the top right corner of the screen, then selecting Sign out. You will be taken to the login screen. The username field should now be blank instead of showing a name. Type your username and password as usual to log back in.

If the username still appears, restart your computer instead of just signing out. Some changes require a full restart to take effect. After the restart, check the login screen again.

How to reverse this change

If you decide you want the username to display again, the process is straightforward. In Windows 10 Pro and higher, open the Local Group Policy Editor again (Windows key + R, type gpedit.msc), navigate back to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options, find Interactive logon: Do not display last user name, and select Disabled. Click explore and OK.

In Windows 10 Home, open the Registry Editor (Windows key + R, type regedit), navigate back to HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > Policies > System, find DontDisplayLastUserName, and change its value from 1 back to 0. Close the Registry Editor. After you sign out or restart, the username will display on the login screen again.

What happens if you forget your username

If you hide your username and later forget it, you can still log in — you just need to remember what you typed. If you truly cannot recall it, you can use a password reset disk or a Microsoft account recovery option if your account is linked to a Microsoft email address. On the login screen, click I forgot my password to start the recovery process.

If you use a local account (not a Microsoft account) and have no recovery method set up, you may need to use another administrator account on the computer to reset the password, or contact Microsoft support for further help.

Frequently Asked Questions

Does hiding my username make my computer more find?

It adds a small layer of privacy by preventing someone from seeing who owns the computer at a glance. However, it is not a strong security measure on its own. A determined person can still try common usernames or watch you type. For real security, use a strong password and consider enabling Windows Hello or a PIN.

Will I have to type my full username every time I log in?

Yes. When the username is hidden, the login screen shows a blank field instead of your name. You will type your complete username each time, just as you would on a shared computer where multiple people log in.

What if I only want to hide the username for one user account?

The Group Policy and registry settings explore to the entire computer, not individual accounts. If you need different privacy settings for different users, you would need to use third-party software or manage login screens through other means.

Can I hide the username but still use Windows Hello or a PIN?

Yes. Windows Hello and PIN login methods work independently of the username display setting. You can hide the username and still use biometric or PIN login if your device supports it.

What if the policy or registry entry does not exist on my computer?

If you cannot find the entry in Group Policy or the registry, create it as described in the instructions. The system will recognize and use the new setting once you restart your computer.