Locked out of your own Windows PC

The right route depends entirely on how you sign in — a Microsoft account, a PIN, or an old-style local account. Sorting that out first saves you from trying fixes that were never going to apply.

Before anything else, look at the sign-in screen. If it shows an email address under your name, you're using a Microsoft account, and recovery happens online. If it shows only a username with no email, it's a local account, and the options are different. That one detail decides which section below is yours.

If you sign in with a Microsoft account

This is the good case: the password isn't really stored on the PC, so you don't need access to the PC to reset it.

  1. Reset from any other device

    On your phone or another computer, go to Microsoft's account recovery page and choose "Forgot password." You'll verify your identity through a code sent to your recovery email or phone number.

  2. Set a new password

    Once you've verified, choose a new password. It takes effect on your account immediately.

  3. Sign in on the PC

    Back at the locked machine, make sure it's online (use the network icon on the sign-in screen if needed) and log in with the new password. The PC checks in with Microsoft and lets you through.

A forgotten PIN is not a forgotten password

The PIN only unlocks this specific device; your account password still exists behind it. On the sign-in screen choose Sign-in options and switch to your password, or use I forgot my PIN to set a new one after verifying your Microsoft account.

If you sign in with a local account

A local account lives only on this machine, so there's no online reset. What you have depends on what you set up earlier.

  • Security questions. On Windows 10 and 11, local accounts can have security questions. Enter any wrong password once and a "Reset password" link appears — answer the questions to set a new one.
  • A password reset disk. If you created one on a USB stick back when you still knew the password, the "Reset password" link walks you through using it. (This only works if you made it in advance — Windows can't create one now.)
  • Another admin account. If a second account on the PC has administrator rights, sign in there and change your account's password from Settings → Accounts, or the Computer Management console.
If none of those exist

With a local account, no security questions, no reset disk, and no other admin, there's no supported way to recover that specific password. Your realistic path is to reinstall Windows, which gets you a working computer again but signs you out of that profile — anything not backed up on it is lost. That's a genuine dead end, not a step we're leaving out, and it's worth weighing against how much is actually stored only on that account.

Get your files off first, if you can

If the machine still boots and you can reach another account — or you're comfortable moving the drive to another computer — copy your important files out before you reset or reinstall anything. Recovery steps are much less stressful when your documents are already safe somewhere else.