6 min read

Does an online alarm work when your computer is asleep? No. Here's what does

WakeUpBroo

iPhone alarm

No snooze. To stop it, you get up: type a code on your laptop, or scan an item in another room.

Download

No. When a computer goes to sleep, everything on it stops running, the browser included, so an online alarm can't ring until the computer wakes up again. And no website can wake a sleeping computer. For a browser alarm to ring, the computer has to be awake, the browser open, the tab still loaded and the volume up.

Quick answer: Sleep = no alarm. A closed laptop lid usually means sleep too. The screen turning off is fine as long as the computer itself stays awake. A background tab is fine, but some browsers can delay or unload it. To make it reliable, plug in, stop the computer from sleeping (steps below), keep the lid open and test it once. On a phone, use the phone's own alarm app instead.

Browser and system details below are from Chrome, WebKit, MDN, Apple and Microsoft documentation, checked in November 2026.

Why a website can't wake your computer

A browser can ask for one thing to keep a device awake: a screen wake lock, which stops the screen from dimming, turning off or locking. It only works while the page is visible. Chrome's documentation says the lock is released as soon as you switch tabs or minimize the window. An earlier draft of the standard also had a "system" wake lock that would have kept the processor out of standby, and Chrome says it isn't going ahead with it.

So a website can try to keep the screen on while you're looking at it. It can't stop the computer sleeping on schedule, it can't survive a closed lid, and it can't wake a computer that's already asleep.

What counts as "asleep"

What happened overnightDoes the online alarm ring?
The screen turned off, but the computer stayed awakeUsually yes
The computer went to sleep after sitting idleNo
You closed the laptop lidAlmost always no, because closing the lid puts most laptops to sleep
You quit the browser or closed the tabNo
The tab is open behind other tabsYes, though it can ring late or get unloaded (below)

Background tabs: allowed, with catches

You don't have to keep the alarm tab in front. But browsers save power by holding back pages you aren't looking at:

  • Chrome slows down hidden tabs. Timers in a hidden tab are checked about once a second. If the tab has been hidden for more than 5 minutes and silent for at least 30 seconds, Chrome can check them as rarely as once a minute, so a simple browser alarm can ring up to a minute late.
  • Chrome's Memory Saver can unload tabs you aren't using. Tabs playing audio are excluded. To be safe, add the site in Settings → Performance → Always keep these sites active.
  • Chrome's Energy Saver turns on when you're unplugged or low on battery and stops some background tabs. Another reason to plug in.
  • Safari on a Mac gives background tabs lower priority and slows their timers, according to WebKit's engineers.

What our online alarm clock does

Our free online alarm clock asks the browser to keep the screen on while an alarm is set, and asks again each time you come back to the tab. It checks the time several times a second, and when the alarm goes off it rings with a loud beep and a flashing tab title.

What it can't do is keep the computer awake with the lid closed, or wake it from sleep. No website can. That part is up to your settings.

How to keep your computer awake overnight

Plug the computer in first. Most of these settings only apply on power, and a laptop that runs out of battery can't ring either.

Mac laptop

  1. Open System Settings → Battery → Options.
  2. Turn on Prevent automatic sleeping on power adapter when the display is off.

The screen can still turn off (System Settings → Lock Screen controls when). The Mac stays awake, so the sound still plays.

Mac desktop

System Settings → Energy → turn on Prevent automatic sleeping when the display is off.

The caffeinate command (Mac)

If you'd rather not change settings, open Terminal and run caffeinate -i -t 36000. The -i stops the Mac idle-sleeping, and -t 36000 drops the hold after 36,000 seconds (10 hours). Leave the Terminal window open. caffeinate -s is stronger and stops system sleep altogether, but only works while the Mac is on power. Without -t, it runs until you press Control-C.

Keep the lid open

Closing a MacBook's lid puts it to sleep. The only exception Apple supports is closed-display mode, which needs an external display, power and a keyboard and mouse attached. For an alarm, just leave the lid open.

Windows 11

  1. Open Settings → System → Power & battery → Screen, sleep & hibernate timeouts.
  2. Set Make my device sleep after to Never, at least for when it's plugged in. Turning the screen off is fine.

On a laptop, closing the lid also triggers sleep by default. You can change that in Control Panel → Power Options → Choose what closing the lid does. But a closed lid can muffle the speakers, so it's simpler to leave it open.

Test it once

Set the alarm for 10 minutes from now, let the screen turn off, and walk away. If it rings, your setup works. If it doesn't, the computer went to sleep.

What about a phone browser?

Phone browsers are worse at this. WebKit's engineers say Safari on iOS suspends background tabs when it can, so if you lock the screen or switch apps, an alarm page can stop running. Wake lock requests can also be turned down in power-saving modes or when the battery is low.

On a phone, use the alarm app that's built in. On iPhone, Clock alarms ring with the screen locked and even in Silent Mode. Just make sure the phone is charged, because alarms don't go off when the phone is off.

An iPhone alarm that doesn't need a tab open

A browser alarm is fine for a nap at your desk. For waking up in the morning, it relies on too many things going right overnight, and when it does ring, the Stop button is one click away.

WakeUpBroo is our iPhone alarm. It uses Apple's alarm system, so iOS rings it on schedule with the phone locked, and there's no tab to keep open. It has no snooze and no dismiss button. It stops only when you finish a wake-up task. In the default Hard mode, that means typing a code that changes every 5 minutes from wakeupbroo.com/code on a laptop, PC or tablet, or scanning its QR code.

So your computer becomes the off switch, not the alarm. It can sleep all night. You wake it up when you walk over to it, and by then you're out of bed. Don't have a computer handy? Medium mode makes you scan a household item instead. WakeUpBroo is free to download with a 3-day free trial, then $1.49 a month or $9.99 a year, iPhone only.

If your problem is sleeping through alarms rather than the computer, start with how to not sleep through your alarm.

FAQ

Frequently asked questions

Does an online alarm clock work when the computer is asleep?

No. A sleeping computer stops running everything, including the browser, so the alarm can't ring until the computer wakes up. No website can wake it. Stop the computer sleeping overnight, or use an alarm on your phone.

Will an online alarm go off if I close my laptop?

Almost never. Closing the lid puts most laptops to sleep, and a sleeping laptop can't play sound. Leave the lid open, plug the laptop in and set it not to sleep while it's on power.

Does an online alarm work in a background tab?

Yes, as long as the browser stays open and the computer stays awake. Chrome can check timers in a hidden tab as rarely as once a minute, so a simple browser alarm can ring a little late, and Memory Saver can unload tabs you aren't using unless you add the site to its always-active list.

How do I keep my Mac awake for an alarm?

Plug it in, then go to System Settings → Battery → Options and turn on Prevent automatic sleeping on power adapter when the display is off. Or run caffeinate -i in Terminal and leave the window open. Keep the lid open either way.

Can a website wake my computer up?

No. Browsers only let a page ask to keep the screen on while the page is visible. That request is dropped when you switch tabs or minimize the window, and it can't wake a computer that's already asleep.

Do online alarm clocks work on a phone?

Not reliably. Phone browsers pause pages that aren't on screen, so locking the phone or switching apps can stop the alarm. Use your phone's built-in alarm app instead.

An alarm that doesn't need a tab open.

WakeUpBroo is an iPhone alarm that iOS rings on schedule, with the phone locked. It has no snooze and no dismiss button: it stops only when you type a rotating code from this website on your computer, so the laptop is the off switch, not the alarm.

Keep reading

November 18, 2026

Do alarms go off on Low Power Mode? Yes, with one catch

Low Power Mode doesn't stop iPhone alarms or lower their volume. What it does change, how third-party alarm apps are affected, why it can turn on by itself at 20%, and the real risk: a dead battery.

Read guide

November 18, 2026

Is snoozing bad for you? What the research says

Is it OK to snooze your alarm? What the 2023 Journal of Sleep Research study and other research found about snoozing, sleep inertia and broken sleep, and why heavy sleepers should still drop the snooze.

Read guide

November 18, 2026

Bed shaker alarm: how it works, and iPhone options

What a bed shaker is, how wired and Bluetooth shakers work, which ones work with iPhone, how well they wake people (80-84% in one study), and why you still need an off switch you can't reach from bed.

Read guide

November 18, 2026

How to wake up early as a heavy sleeper

Move your wake time 15 to 30 minutes at a time, keep it fixed on weekends, get morning light, and skip the catch-up snooze after a late night. A practical plan for deep sleepers, with sources.

Read guide

November 18, 2026

How to wake up without feeling groggy: what actually helps

Morning grogginess is sleep inertia, and it usually lasts 15 to 60 minutes. Evidence-based ways to make it milder: sleep debt, a fixed wake time, cycle timing, light, caffeine and getting up.

Read guide

November 18, 2026

Alarmy vs I Can't Wake Up!: which task alarm is better?

I Can't Wake Up! is no longer on the iPhone App Store. How it compares with Alarmy on Android: wake-up tasks, price, how easy each is to cheat from bed, and who each suits.

Read guide

Free tools

Try these while you're here