You need to sign into your Windows 10 PC, but you forgot your password. Don't worry; Windows 10 lets you reset a forgotten password, whether you use a Microsoft Account or a local account.

Resetting a Microsoft Account password is fairly straightforward. But for a local account, you first need to set up a few security questions and answers. If you forget your password, simply answer the three questions successfully, then reset your password.

Beyond using a password, you should enable a backup authentication method of signing into Windows. With Windows 10, you can create a PIN, a picture password, a security key, fingerprint recognition, or facial recognition. And with a Microsoft Account, you should also implement two-step verification. But at some point you may still need to sign in with your password.

No matter how responsible you are, there may come a time when you’re locked out of Windows because you can’t remember your password. Here's how to get in.

Microsoft Account Recovery

If you’re using a Microsoft Account and can’t remember your password, click I forgot my password on the Windows 10 sign-in screen.

How to Reset a Forgotten Windows 10 Password

You must then confirm your email address and choose how you wish to receive your verification code. Click Get code, then check your email or text messages for the code. Enter it in the appropriate field and click Next.

Create a new password for your Microsoft Account. Click Next.

Windows will confirm that the password has been changed. Click the Sign in button, return to the sign-in screen, and enter your new password.

Local Account Recovery

Microsoft has made it increasingly harder to use a local account to log into Windows, but it's still possible. If you have one, you should set up the necessary security questions that will help you recover your account. In Windows, go to Settings > Accounts > Sign-in options. Under the Manage how you sign in to your device section, click Password, then select the Update your security questions link.

Enter the password for your local account, then choose your security questions, type the answers, and click Finish.

Now, if you forget your password, click the arrow next to the password field or press the Enter key. Windows tells you that the password is incorrect. Click OK, then select Reset password.

Enter the answers for your security questions, then click the arrow next to the last answer or press Enter.

Windows prompts you to create a new password. Type and then confirm your new password, then press Enter to get access to Windows.