How to Lock Your PC Screen with a Password in Windows 10

Last updated on November 12th, 2026 at 08:20 pm

Pressing Windows key + L locks a Windows 10 PC instantly, but it only keeps people out if your account has a password or PIN, set under Settings > Accounts > Sign-in options. You can also make Windows lock itself after a few minutes of inactivity, or when your phone moves out of Bluetooth range.

How to lock a Windows 10 PC with a password: set a password, press Windows+L, set automatic locking and use Dynamic lock
Set a password, then lock manually or automatically. Illustration based on the Windows 10 sign-in options.

Windows 10 reached end of support in October 2025, so enroll in Windows 10 Extended Security Updates to keep getting security fixes.

1. Make sure your account has a password

Locking only protects your PC if there’s a password, PIN or other sign-in method. Without one, anyone can click Sign in and get straight back to your desktop.

  1. Press Windows + I to open Settings.
  2. Go to Accounts > Sign-in options.
  3. Under Password, click Add if you don’t have one. Enter a password and a hint, and click Finish.
  4. Optionally, set up a Windows Hello PIN under PIN. It’s quicker to type and only works on this PC.

If you sign in with a Microsoft account, your password already exists. You can change your PIN later from the same page.

Choose a good password or PIN

  • Passwords: Use at least 12 characters. A short phrase of unrelated words is easier to remember than random symbols, and just as hard to guess.
  • PINs: Avoid birthdays, 1234 and repeated digits. Windows lets you use longer PINs, and letters too, if you tick Include letters and symbols when you set one up.
  • Don’t reuse it. If you use a local account, don’t use the same password you use for email or banking.

Windows Hello face or fingerprint sign-in, if your PC supports it, is quicker still, and it unlocks the PC without anyone seeing you type.

2. Lock your PC instantly

Use any of these methods:

  • Keyboard shortcut: Press Windows key + L. This is the fastest method.
  • Ctrl + Alt + Delete: Press the three keys together and choose Lock.
  • Start menu: Click Start, then your account picture, then Lock.

Your apps and documents stay open while the PC is locked. When you come back, sign in and everything will be where you left it. From that same lock screen, another person can pick their own name in the lower-left corner, one of several ways to use a different account on Windows 10. If you get stuck at the lock screen later, this help for signing back in covers PIN, password and Windows Hello.

Make a lock shortcut on the desktop

  1. Right-click the desktop and choose New > Shortcut.
  2. For the location, type rundll32.exe user32.dll,LockWorkStation and click Next.
  3. Name it Lock PC and click Finish.

Double-click the shortcut to lock. You can also right-click it and choose Pin to taskbar for one-click locking.

3. Lock automatically when you’re inactive

If you often forget to lock, have Windows do it for you after a set time:

  1. Go to Settings > Personalization > Lock screen.
  2. Scroll down and click Screen saver settings.
  3. Choose any screen saver, or (None) if you don’t want one to show.
  4. Set Wait to the number of minutes you want, such as 5.
  5. Tick On resume, display logon screen and click OK.

After that many minutes of no mouse or keyboard activity, the PC locks.

Require a password after sleep

Go to Settings > Accounts > Sign-in options. Under Require sign-in, choose When PC wakes up from sleep. This makes sure that closing a laptop lid also locks it.

4. Lock automatically when you walk away (Dynamic lock)

Dynamic lock uses your phone’s Bluetooth connection to tell when you’ve left.

  1. Pair your phone with the PC under Settings > Devices > Bluetooth & other devices.
  2. Go to Settings > Accounts > Sign-in options.
  3. Under Dynamic lock, tick Allow Windows to automatically lock your device when you’re away.

When your phone goes out of range, the PC locks about a minute later. It’s a backup, not a replacement for Windows + L, because someone could still use the PC in that minute.

Customize what the lock screen shows

You can change the lock screen background and choose which apps show notifications on it under Settings > Personalization > Lock screen. To hide notification previews from people walking past, turn off Show notifications on the lock screen under Settings > System > Notifications & actions. The sign-in screen has its own settings too, covered in changing the login screen in Windows 10.

Windows + L not working or no password prompt

Windows + L doesn’t work

Some keyboards have a Windows key lock, often labeled as a gaming mode, that turns off the Windows key. Turn that mode off, or use Ctrl + Alt + Delete instead. On a work PC, an administrator may have changed this setting.

The PC locks but doesn’t ask for a password

Your account has no password. Add one as shown in section 1.

I forgot my password

On the sign-in screen, click I forgot my password or I forgot my PIN and follow the prompts. Microsoft accounts can be reset online.

Is it the same in Windows 11?

Mostly. Windows + L works the same way, but some settings have moved, so follow the Windows 11 steps for putting a password on the lock screen.