Files locked and a ransom note on screen: first steps
Ransomware is serious, but acting calmly and in the right order protects your other devices and gives you the best chance of getting your files back without paying.
- Applies to
- Windows 11 and 10
- Difficulty
- Advanced
- Time
- About 12 minutes
- Checked
The short answer
Disconnect the computer from the internet and unplug any backup drives. Do not pay. Photograph the ransom note with your phone, check No More Ransom for a free unlocking tool, and report what happened. Only restore your files from a backup once the computer has been wiped clean.
Ransomware is harmful software that scrambles your files so they will not open, then demands money to unscramble them. It is frightening, but you are not powerless. Work through these steps in order. None of them involves paying anyone.
Tick each step when you have done it. Your ticks stay on this device, so you can come back after a restart.
Step 1: Check whether your files are really locked
Some scary messages only pretend to be ransomware. Before anything else, take a moment to see which kind you have.
- Real ransomware: your own photos and documents will not open, their names have a strange new ending added (for example a run of random letters), and a note about payment sits in your folders or on the desktop.
- A fake warning: the message sits inside your web browser, you can still open your files normally, and it may claim the police have locked your computer or show a phone number.
If it is a fake warning, your files are fine. Follow our guide to closing a fake virus warning safely instead.
Step 2: Disconnect from the internet and unplug your drives
Cutting the connection stops the ransomware reaching other devices, shared folders and online storage such as OneDrive. It also stops it talking to the criminals behind it.
- Select the network icon at the bottom-right of the screen and turn off Wi-Fi. If a cable runs from the computer to your router, unplug it.
- Unplug any USB sticks, external hard drives and memory cards.
- Do not plug your backup drive back in until the computer has been wiped clean, later in this guide.
If other computers in your home share files with this one, check that their files still open normally.
Stop and read this
If this is a work computer, or you use it for a business, tell whoever looks after your organization's computers as soon as it is disconnected, and wait for their advice before going further. They may need to protect other people's data as well as yours.
Step 3: Do not pay the ransom
Paying is very tempting when precious photos are at stake. But police and governments advise against paying, for good reasons:
- There is no guarantee the criminals will unlock your files, even after you pay.
- People who pay are often asked for more, or targeted again later.
- Payments in cryptocurrency or gift cards cannot be reversed.
Do not reply to any email address in the note, and do not visit any website it gives. There are other, safer ways forward.
Step 4: Photograph the ransom note and write down what happened
A clear record helps identify which ransomware you have, which matters for the next step. It also makes your report easier.
- Use your phone to take clear photos of the ransom note, and of a folder showing some of the locked file names.
- Write down the date and time you noticed, and what you were doing just before. For example, opening an email attachment or installing a program.
- Note any name the ransomware gives itself, and any email or web address in the note.
Step 5: Look for a free unlocking tool at No More Ransom
No More Ransom (another website) is a free project run by police agencies, including Europol, together with security companies. It offers free tools, called decryptors, that unlock files scrambled by many kinds of ransomware.
- On your phone or another computer, open the Crypto Sheriff page on No More Ransom (another website).
- Enter the details it asks for. This can include the email or web address from the ransom note, and two of your locked files if you can copy them on a spare memory stick that holds nothing else.
- If a free tool exists, the site links to it. Read its instructions fully before using it.
If no tool exists yet, keep your locked files. New tools are added over time.
Step 6: Report what happened
Reporting helps police link attacks together, and you may need a report reference for your bank or insurer.
- In the US, report it to the FBI's Internet Crime Complaint Center at ic3.gov (another website).
- In the UK, use Report Fraud (another website).
- Elsewhere, contact your national police.
Some ransomware also copies personal files. If you kept bank details or ID documents on the computer, tell your bank. In the US, IdentityTheft.gov (another website) explains how to protect yourself. Change your important passwords from a different device, starting with email.
Step 7: Wipe the computer clean before you restore anything
Scans can remove ransomware, but the surest way to know the computer is clean is to reinstall Windows. This is called Reset this PC.
Before you do this
Choosing Remove everything deletes every file on the computer, including the locked ones. If you have no backup, first copy the locked files onto a spare drive and keep it unplugged. A free tool might unlock them one day.
- Select Start, then Settings, and go to SystemRecovery. On Windows 10, go to Update & SecurityRecovery.
- Next to Reset this PC, select Reset PC (on Windows 10, Get started).
- Choose Remove everything. When asked how to reinstall Windows, Local reinstall works without the internet.
- Follow the prompts. It can take an hour or more.
Step 8: Restore your files from a backup
Once Windows is fresh, sign in, reconnect to the internet and run Windows Update. Then bring your files back.
- OneDrive: if you pay for Microsoft 365, sign in at onedrive.com, select the Settings gear, then OptionsRestore your OneDrive. It can roll your files back to how they were up to 30 days ago. Without a subscription, you can recover single files through each file's Version history.
- File History: only now, plug in your backup drive. Select Start, type File History, open it and choose Restore personal files.
- Another backup drive: plug it in and copy your files back.
Protecting yourself from now on
Keep at least one backup on a drive that stays unplugged except while it is copying. Keep Windows up to date, and make sure Microsoft Defender is on. Windows Security also has a feature called Controlled folder access, under Virus & threat protectionRansomware protection, which blocks unknown programs from changing your documents. If your computer runs Windows 10, it no longer receives security updates, so plan a move to Windows 11 or a newer computer when you can.
Did this solve it?
Well done. You fixed it yourself. You can clear your ticks with the button in the progress panel, or keep this page for next time.
That is all right, some problems take more than one try. Go back over any step you skipped, then try the related guides below. For problems with your account, subscription or the product itself, the company’s own website is the right place: support.microsoft.com.
A note on staying safe
Microsoft, McAfee and Norton will never phone you out of the blue, show a phone number in a virus warning, or ask to connect to your computer to fix it. If anyone does, it is a scam. Hang up or close the page. If you are unsure, find the company’s website yourself by typing its address, never through a link in a pop-up, email or text.