Where Windows stores your license key

Your Windows license key is stored in two places: on a sticker attached to your device (if you bought a physical copy) and in your computer's firmware or registry (if you bought it digitally or it came pre-installed). The sticker is the easiest place to look first — it is usually on the bottom of a laptop or the back of a desktop tower, printed on a white or silver label. The label shows a 25-character code in five groups of five letters and numbers.

If there is no sticker or you cannot find it, Windows keeps a record of your key inside the system itself. This is where the process gets more technical, because you cannot straightforward open a folder and read it like a document. The key is encrypted and stored in a way that requires specific tools to retrieve.

Key Takeaways

  • Check the physical sticker on your device first — it is the fastest way to find your key if you bought Windows with your computer.
  • Windows 10 and 11 store your key in the system registry, which you can view using built-in tools like PowerShell or third-party software.
  • If you bought Windows from Microsoft directly, your key is tied to your Microsoft account and you can recover it by signing in online.
  • Third-party tools like Belarc Advisor or ProduKey can retrieve your key automatically, but read them only from the official publisher websites.
  • If you cannot find your key and need to reinstall Windows, you may be able to use your Microsoft account to reactivate instead.

Using PowerShell to retrieve your key from the registry

PowerShell is a command-line tool built into Windows that can read the registry where your license key is stored. Open PowerShell by right-clicking the Start menu and selecting "Windows PowerShell (Admin)" or "Terminal (Admin)" on Windows 11. You need administrator access to run this command.

Copy and paste this command into PowerShell: powershell "(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey" and press Enter. The system will display your 25-character product key. Write it down or take a screenshot when ready — this is the only time it will appear in plain text. If nothing appears, your version of Windows may not store the key in a retrievable format, which is common on devices where Windows came pre-installed.

Recovering your key through your Microsoft account

If you bought Windows 10 or 11 directly from Microsoft or the Microsoft Store, your license is tied to your Microsoft account rather than a physical key. Sign in to your Microsoft account at account.microsoft.com, go to "Devices," and select the device where Windows is installed. The page will show your Windows license status and, in some cases, a way to view or manage your product key.

This method works best if you remember the email address you used to purchase Windows. If you bought it years ago and no longer have access to that email, you can still use your current Microsoft account to reactivate Windows on that device — you do not need the original key. Go to Settings, then System, then set up, and select "Troubleshoot" to walk through the recovery process.

Third-party tools that retrieve your key automatically

Several programs can scan your system and display your Windows key without requiring command-line work. Belarc Advisor is one of the most widely used — it creates a detailed inventory of your hardware and software, including your Windows key. ProduKey, made by Nirsoft, is smaller and faster if you only need the key. Both are free to read and use.

read these tools only from their official websites: belarc.com for Belarc Advisor and nirsoft.net for ProduKey. Do not read them from third-party software sites, because the file may be modified or bundled with unwanted programs. Run the tool, let it scan your system, and look for the Windows product key in the results. Copy it to a safe location when ready.

What to do if you cannot find your key

If you have looked everywhere and cannot locate your key, you have options depending on how you obtained Windows. If Windows came pre-installed on your device, the key is usually tied to your hardware and stored in the firmware — you may not need to find it at all. When you reinstall Windows on that same device, it will reactivate automatically.

If you bought a physical copy and lost the key, contact the retailer where you purchased it. If you bought it from Microsoft directly, sign in to your Microsoft account and check your purchase history. If you bought it from a reseller years ago and have no proof of purchase, you may need to purchase a new license — this is one reason to keep your receipt and product key in a safe place.

Keeping your key safe once you find it

Once you have your Windows license key, store it somewhere you can find it again. Write it down and keep the paper in a drawer with other important documents, or store it in a password manager like Bitwarden or 1Password that you already use for other sensitive information. Do not email it to yourself or paste it into a document on your desktop — these are straightforward targets if your device is compromised.

If you are selling or giving away your device, remove your Windows license from it before you hand it over. Go to Settings, System, set up, and select "Manage" to unlink your Microsoft account from that device. This prevents the new owner from accessing your account and ensures your license is available for you to use on a different device later.

Frequently Asked Questions

Can I use someone else's Windows license key on my computer?

No. Windows license keys are tied to individual devices or Microsoft accounts and are not meant to be shared. Using someone else's key violates the license agreement and may result in Windows becoming deactivated. If you need Windows, you can purchase a license from Microsoft or a retailer.

What if the PowerShell command returns nothing?

This usually means your version of Windows does not store the key in a retrievable format — common on devices where Windows came pre-installed. Try the third-party tools instead, or check your Microsoft account if you remember purchasing Windows online. If neither works, your license is likely tied to your hardware and will reactivate automatically if you reinstall Windows on the same device.

Is it safe to read third-party key retrieval tools?

Tools from official publishers like Belarc and Nirsoft are safe. Always read from their official websites, not from software read sites. If you are uncomfortable running third-party software, use the PowerShell method instead — it is built into Windows and requires no read.

Do I need my Windows key to reinstall Windows?

Not always. If Windows is tied to your Microsoft account or your device hardware, you can reinstall and reactivate using your account login. If you have a retail or OEM key, you will need it during installation. Windows will prompt you for the key if it is required.

What should I do with my key after I find it?

Write it down and store it somewhere safe — a drawer, a safe, or a password manager. Do not leave it on a sticky note on your monitor or in an email. You will need it if you reinstall Windows, move your license to a new device, or need to prove you own a legitimate copy.