Blue Screen Error on Windows? How to Fix It

A sudden blue or black screen with a stop code is scary, but it is usually fixable. Here is what it means and what to do, step by step.

Short answer

A blue (or black) screen with a stop code means Windows hit a serious error and restarted to protect itself. If it happens only once, the restart usually fixes it. If it keeps happening, remove any new hardware, install Windows updates, update drivers in Device Manager and free up disk space. If Windows won't start, use Startup Repair or safe mode from the Windows Recovery Environment.

In this article 10 sections
  1. What the blue screen actually means
  2. Blue, black or green?
  3. What usually causes it
  4. First: write down the stop code
  5. If it only happened once
  6. Fixes to try, in order
  7. If Windows keeps crashing or won't start
  8. Beware fake "blue screens"
  9. When to get help
  10. Common questions
A Windows 11 stop code error screen on a Dell laptop
A stop code error, often called the blue screen of death, on a Windows 11 laptop. Photo: QueenBarenziah / Wikimedia Commons, CC BY 4.0

Your screen suddenly turns blue (or black), a message says "Your device ran into a problem and needs to restart", and the PC reboots on its own. It is alarming, but a single crash is rarely a disaster. This guide explains what the screen means and the steps Microsoft recommends if it keeps happening, on Windows 11 and Windows 10.

What the blue screen actually means

Microsoft calls this a stop code error. It is also known as a bug check, a kernel error or the blue screen of death (BSOD). Windows shuts down or restarts when a serious problem occurs, and the screen shows a stop code such as MEMORY_MANAGEMENT or PAGE_FAULT_IN_NONPAGED_AREA, sometimes with the name of the file that was running at the time.1

Stopping is deliberate. Windows halts when something fails in a way that could compromise security or corrupt the system or your data.2

Blue, black or green?

The colour and wording depend on your version of Windows, and Windows 11 version 24H2 and later uses a different design from older versions.1 Computerworld reported in 2025 that Microsoft was replacing the classic blue screen with a black one that drops the sad face and QR code and mainly shows the stop code and what caused it.5 Preview (test) builds of Windows can show a green screen instead.2 Whatever the colour, the fixes below are the same.

A black screen with no stop code, or with only a mouse pointer, is a different problem. Microsoft treats that as a blank screen issue with its own guide.1

What usually causes it

Microsoft's analysis of crashes found that about 70% were caused by third-party driver code (drivers are the small programs that let Windows talk to hardware), about 10% by hardware faults, about 5% by Microsoft's own code, and 15% could not be traced.2 An app you were using may trigger the crash, but it usually just exposes a deeper problem in a driver, the hardware or Windows itself.2

Airport information screens at LaGuardia Airport showing Windows blue screens instead of flight details.
In July 2024 a faulty update to CrowdStrike security software crashed Windows PCs worldwide, including these airport screens. Photo: Smishra1 / Wikimedia Commons, CC BY-SA 4.0

First: write down the stop code

Before the PC restarts, note or photograph the stop code and any file name shown. Microsoft suggests searching for that exact code to see whether there is a known problem and fix.2

Close-up of a Windows blue screen with a sad face, a QR code, the stop code SYSTEM_THREAD_EXCEPTION_NOT_HANDLED and the file name dxgmms2.sys.
The stop code and the file name near the bottom of the screen are the details worth writing down or photographing. Photo: Oleg Yunakov / Wikimedia Commons, CC BY-SA 4.0

If it only happened once

In most cases the automatic restart solves the problem and you don't need to do anything else.1 If the same stop code keeps coming back, work through the steps below in order.

Fixes to try, in order

  1. Remove new hardware. If you connected or fitted something new just before the crashes started, shut down, remove it and restart.1

  2. Install Windows updates. Go to Start > Settings > Windows Update and select Check for updates.1 Microsoft also advises keeping the BIOS and firmware up to date, which your PC maker provides.2

  3. Check Device Manager. Right-click the Start button and select Device Manager. Look for any device marked with an exclamation mark, right-click it and select Update driver. If that doesn't help, try disabling or uninstalling the device.1

  4. Free up disk space. Windows needs spare room to work properly. Microsoft suggests keeping 10% to 15% of the drive free.1,2

  5. Scan for malware. Run Microsoft Safety Scanner or another trusted antivirus program.2

  6. Undo recent changes. If the crashes began after you installed a program or driver, Microsoft suggests going back to the last working state, for example by rolling back the driver.2

If Windows crashes too quickly to try these, start it in safe mode first (see below) and do the steps from there.1

If Windows keeps crashing or won't start

If Windows fails to start properly several times in a row, it opens the Windows Recovery Environment (Windows RE) by itself.3 You can also open it yourself:

  1. From Settings: go to Settings > System > Recovery and, next to Advanced startup, select Restart now. On Windows 10 it is under Update & Security > Recovery.3

  2. From the Power menu: hold the Shift key while you select Power > Restart.3

  3. If Windows won't load at all: switch the PC on and, as soon as the logo appears, hold the power button until it turns off. Do this twice. On the third start, Windows should show the Automatic Repair screen. Select Advanced options.3

In Windows RE, choose Troubleshoot > Advanced options. The most useful tools are:

  • Startup Repair, which diagnoses and fixes common problems that stop Windows from starting.3
  • Uninstall Updates, if the crashes started straight after an update.3
  • System Restore, which rolls back system files and settings but not your personal files.3
  • Startup Settings, then Restart, then the number key next to Enable Safe Mode. Safe mode loads only a basic set of files and drivers, so if the crashes stop there, the default settings and basic drivers are not the cause.4
A street advertising screen in a Washington, DC bus shelter showing a blue Windows recovery screen.
After repeated failed starts, Windows opens its recovery screen by itself, as on this bus-shelter display in July 2024. Photo: Ted Eytan / Wikimedia Commons, CC BY-SA 2.0

Newer versions of Windows 11 can also use an internet connection in Windows RE to download fixes from Microsoft through a feature called quick machine recovery.3,5

Have your BitLocker key ready, and back up first

If your drive is encrypted, you will need your BitLocker recovery key to start safe mode and to use some recovery tools.3,4 The Reset this PC option can remove your personal files, depending on the choice you make, so back up anything important first if you can.3

Beware fake "blue screens"

Tech support scams often start with a fake warning that looks as if it comes from a well-known company and urges you to call a phone number.6 The scammers then ask for remote access to your computer and charge you to "fix" a problem that doesn't exist, often asking for payment by gift card, bank transfer or cryptocurrency.6 Real security warnings never ask you to call a number, and real tech companies won't contact you out of the blue about a problem with your computer.6 If a page like this appears in your browser, close it and don't call. Our guide to common online scams covers more tricks to watch for.

When to get help

Contact your PC maker or a repair shop if the crashes continue after updates and driver fixes, or if they happen even in safe mode. Microsoft notes that hardware faults are especially hard to diagnose and recommends running hardware and memory tests.2 If the stop screen names a particular driver, ask the maker of that hardware or software for an update.2

Common questions

Will I lose my files after a blue screen?

Usually not. A one-off crash is normally fixed by the restart.1 System Restore also leaves your personal files alone, but Reset this PC can remove them if you choose that option.3

Can a Windows update cause a blue screen?

It can, which is why Windows RE includes an option to uninstall recent updates.3 If an update itself won't finish, see Windows Update stuck? How to fix it.

Why is a software fault called a "bug"?

Microsoft's own name for these crashes is a "bug check".2 For the story behind the word, read why a software error is called a bug.

Sources and further reading

  1. Troubleshooting Windows unexpected restarts and stop code errors — Microsoft Support
  2. Advanced troubleshooting for stop code errors — Microsoft Learn
  3. Windows recovery environment — Microsoft Support
  4. Windows startup settings — Microsoft Support
  5. No more blue screens: How Microsoft is making Windows more resilient — Computerworld2025-07-09
  6. How To Spot, Avoid, and Report Tech Support Scams — Federal Trade Commission

Was this article helpful?

Tell us where you got stuck

Didn’t work? Tell us which step went wrong. We read every note and use them to fix and improve this guide.

Private. This goes only to the ByteExplained editors with the guide’s title. It isn’t published on the site.

Please don’t include passwords, QR or activation codes, or identifiers such as your phone number, EID or IMEI.

Comments

No comments yet. Questions and tips from readers are welcome.