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

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

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
Remove new hardware. If you connected or fitted something new just before the crashes started, shut down, remove it and restart.1
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
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
Free up disk space. Windows needs spare room to work properly. Microsoft suggests keeping 10% to 15% of the drive free.1,2
Scan for malware. Run Microsoft Safety Scanner or another trusted antivirus program.2
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:
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
From the Power menu: hold the Shift key while you select Power > Restart.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

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.
