No, an online alarm does not work when your computer is asleep. A sleeping device pauses almost everything, including the quiet countdown that makes the alarm ring. The page can't fire a sound while the machine is napping, so the alarm misses its moment.
Key points
- A sleeping computer can't run the countdown, so the alarm won't ring.
- This is the number-one reason browser alarms fail overnight.
- Most laptops sleep on their own after a few idle minutes on battery.
- Keep the device awake: plug in and change your sleep settings.
- The saved alarm survives sleep - It just can't fire while the machine is out.
Why sleep stops the alarm
A browser alarm rings because the open page is running a small clock in the background. It checks the time over and over and plays a sound when it matches. That checking is the engine.
When your computer goes to sleep, it powers down most of itself to save energy. The screen goes dark, the processor mostly stops, and that little clock stops checking. No checking means no match, and no match means no sound.
So it's not that the page forgets your alarm. The alarm is still saved. The machine just isn't awake to act on it. For the full mechanics, how browser-based alarms work without an app walks through the engine in plain terms.
Sleep vs. lock vs. closing the lid
People mix these up, and they don't all do the same thing. Here's the breakdown:
| What happened | Does the alarm ring? | Why |
|---|---|---|
| Computer asleep | No | The countdown is paused |
| Screen just locked | Usually yes | The page keeps running underneath |
| Laptop lid closed | Usually no | Closing the lid often triggers sleep |
| Display off, machine awake | Yes | A dark screen isn't sleep |
| Tab closed | No | The countdown stops entirely |
The tricky middle ground is "display off but awake." A dark screen alone is fine - The alarm still rings. Real sleep is different. And on most laptops, closing the lid sends them to sleep, so that's the same as the first row. For the tab-closing case, see what happens to your browser alarm when the tab closes.
How to keep your computer awake
You can stop your machine from sleeping so the alarm works. Try these:
- Plug in the charger. Laptops sleep faster on battery to save power. Power changes the rules.
- Open your power or energy settings. Set "sleep" to "never" while plugged in, or push it past your alarm time.
- On a Mac, check Battery and Power Adapter settings, and turn off "put hard disks to sleep." A tool like Amphetamine or
caffeinatekeeps it up too. - On Windows, set the plugged-in sleep timer to "Never" under Power & Sleep.
- Close the lid only if you've set your machine to stay awake with the lid shut. Otherwise leave it open.
For an overnight wake-up, this matters most. Our guide on keeping your browser alarm running overnight covers the exact settings step by step.
A quick test you should run
Settings are easy to get wrong, so prove it before you trust it. Set a 5-minute timer or a short alarm, then leave the computer alone and don't touch it. If it sleeps before the alarm fires, you'll find out now instead of at 6 AM.
Doing a quick dry run is the single best habit here. How to test your online alarm before you need it shows a simple routine you can repeat anytime you change machines.
When a browser alarm isn't enough
If your laptop sleeps no matter what you try, or you can't leave it plugged in, a browser alarm may not be your safest morning wake-up. It shines when you're already at the computer - Focus blocks, naps, cooking timers, and reminders during the workday.
For overnight or deep-sleep wake-ups, pair it with a backup, or read how to wake up on time without a phone alarm for other approaches. Heavy sleepers especially should check waking up as a heavy sleeper, since a single sleeping laptop is a weak point.
TL;DR
An online alarm won't ring while your computer is asleep, because a sleeping device can't run the countdown that triggers the sound. The saved alarm stays put, but it can't fire until the machine is awake. Plug in, set sleep to "never" past your alarm time, keep the tab open, and test it first.