How to locate your Windows license key

Your Windows license key is stored on your computer in a few standard places, depending on whether you installed Windows yourself or it came pre-installed. The easiest method is to use a built-in Windows tool called the Command Prompt, which can display your key in seconds. If that does not work, you can check your computer's BIOS settings, look through your email for a confirmation from Microsoft, or contact your PC manufacturer if Windows came with your machine.

The key itself is a 25-character code divided into five groups of five characters each. It looks like this: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX. Windows uses this key to verify that your copy of the operating system is genuine and properly registered to your device.

Key Takeaways

  • The Command Prompt command wmic os get serialnumber displays your Windows license key directly on your screen in under a minute.
  • If you purchased Windows separately, check your email for a receipt or confirmation from Microsoft that contains your license key.
  • Pre-installed Windows on a new computer is usually tied to your motherboard and stored in the BIOS, so you may not need to find it manually.
  • Third-party software can also retrieve your key, but the Command Prompt method is free and built into Windows.
  • If you cannot locate your key and need to reinstall Windows, you can often reactivate using your Microsoft account instead.

Using Command Prompt to find your key

Open the Command Prompt by pressing the Windows key and typing cmd, then select "Command Prompt" from the results. Right-click it and choose "Run as administrator" if prompted. This gives the tool the permissions it needs to read your license information.

Type or paste this command exactly: wmic os get serialnumber and press Enter. Your Windows license key will appear on the next line. Copy it carefully — the characters are case-sensitive when you need to use it later, though Windows itself does not distinguish between uppercase and lowercase during activation.

If the command returns a string of characters that does not look like a license key (it may look like a long random number instead), your Windows installation may be using a digital license tied to your Microsoft account rather than a traditional key. In that case, you do not need to find a physical key — your account is your proof of ownership.

Checking your email and Microsoft account

If you purchased Windows directly from Microsoft or through a retailer, you should have received a confirmation email containing your license key. Search your email inbox for messages from Microsoft, the retailer you bought from, or any confirmation of a Windows purchase. The key is usually printed in the email body or attached as a document.

Log into your Microsoft account at account.microsoft.com and look for a "Services & subscriptions" or "Digital content" section. If you bought Windows through your Microsoft account, your license information may be stored there. You can also check the "Devices" section to see which computers are registered to your account.

If you bought Windows from a physical retailer like Best Buy or Staples, the key may be printed on the box, on a card inside the box, or on your receipt. Check any documentation that came with your purchase.

Finding the key in your computer's BIOS

If Windows came pre-installed on your computer, the license key is often stored in your system's BIOS (Basic Input/Output System) rather than as a separate file you can easily access. To view it, restart your computer and enter the BIOS setup screen — this usually requires pressing a specific key during startup, such as F2, F10, Del, or Esc, depending on your manufacturer.

Once in the BIOS, look for a section labeled "System Information," "Product Information," or "Serial Number." The Windows license key may be listed there. If you are not comfortable navigating the BIOS, contact your computer manufacturer's support line with your computer's serial number, and they can provide your Windows key.

Be careful not to change any settings in the BIOS unless you know what you are doing. Simply viewing the information is safe, but altering settings can prevent your computer from starting.

Contacting your computer manufacturer

If your computer came with Windows pre-installed and you cannot find the key through the methods above, contact the manufacturer directly. Dell, HP, Lenovo, Asus, and other major manufacturers keep records of the Windows licenses tied to each device they sell. You will need your computer's serial number, which is usually printed on a sticker on the back or bottom of your machine.

Call the manufacturer's support line or use their online chat support. Provide your serial number and explain that you need your Windows license key. They can look it up in their system and provide it to you. This process usually takes a few minutes to a few hours depending on how busy their support team is.

Using third-party software to retrieve your key

Several free programs can scan your computer and display your Windows license key without requiring Command Prompt knowledge. Programs like Belarc Advisor, Speccy, and ProduKey are commonly used for this purpose. Download one from a trusted source, run it, and it will display your Windows key along with other system information.

These tools work by reading the same system information that the Command Prompt accesses, so they are not doing anything your computer cannot already tell you. The advantage is a simpler interface if you are not comfortable using the Command Prompt. The disadvantage is that you are downloading and running additional software when a built-in tool already exists.

If you choose to use third-party software, download only from the official website of the program developer, not from random download sites. This reduces the risk of downloading malware alongside the tool you want.

What to do if you cannot find your key

If you have tried all the methods above and still cannot locate your Windows license key, you have other options. If you are using Windows 10 or Windows 11, you can often reactivate Windows using your Microsoft account instead of a traditional key. Go to Settings, select "System," then "Activation," and choose "Troubleshoot." Windows will walk you through signing in with your Microsoft account to prove ownership.

If you need to reinstall Windows and do not have your key, you can download Windows from Microsoft's website for free and install it. You will see a watermark on your desktop and some customization features will be limited, but the operating system will function. Once you locate your key or purchase a new one, you can enter it to remove the watermark and unlock full features.

If your computer came with Windows and you are the original owner, Microsoft's support team may be able to help you recover your license information. Contact them through the Microsoft Support website and explain your situation.

Frequently Asked Questions

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

No. Windows license keys are tied to individual computers or Microsoft accounts and cannot be transferred to a different device without deactivating them on the original computer. Using someone else's key is a violation of Microsoft's terms of service. If you need Windows on a new computer, you need to purchase a new license or transfer your existing license through Microsoft's official process.

What is the difference between a product key and a license key?

These terms are used interchangeably by Microsoft. A product key and a license key are the same thing — the 25-character code that proves you own a copy of Windows. Some people also use the term "serial number," though technically the serial number is a different identifier stored in your BIOS.

Do I need my Windows key if I sign in with my Microsoft account?

Not necessarily. If your Windows installation is linked to your Microsoft account, you can reactivate Windows by signing in with that account, even if you do not have the original key. However, it is still useful to have your key written down in case you need to reinstall Windows on a new device or troubleshoot activation problems.

Is it safe to share my Windows license key online?

No. Your Windows license key is like a password — anyone who has it can use it to activate Windows on their own computer. Do not post it on forums, share it in emails, or give it to anyone you do not trust completely. If you think your key has been compromised, contact Microsoft support.

What if the Command Prompt shows a key that does not look right?

If the output is a long string of numbers rather than the five-group format, your Windows installation is using a digital license tied to your Microsoft account or device hardware rather than a traditional product key. This is normal for Windows 10 and Windows 11 installations that came pre-installed on your computer. You do not need a separate key — your account or device is your proof of ownership.