Will an Alarm Go Off With the Laptop Lid Closed?
By Mark Fulton · 2026-10-29 · Last verified Oct 29, 2026 · 12 min read

Usually, no. Closing a laptop lid puts it to sleep by default, and a sleeping laptop runs no programs, so the Windows Clock app, the Mac Clock app and an alarm in a browser tab all stay silent. Some machines can be set to wake themselves for an alarm, and a Mac may do it in some cases, but that depends on the hardware and the settings, and you can't see from the outside whether yours will. The setups that reliably work are simpler: leave the lid open, plug in, let the screen dim instead of sleeping the machine, and keep a phone alarm as the backup. That is the whole answer. The rest of this post covers why, what each platform does, and how to set up a laptop for an overnight alarm you can trust.
If you've ever set an alarm on a laptop, closed it, and woken up late, you didn't do anything wrong. The alarm was set correctly. The machine just wasn't running when the time came. Below is how to check which of the three common situations you're in, and what to change for each.
What happens to an alarm when you close the lid?
Closing the lid is, for most laptops, a sleep command. Microsoft's engineering documentation on Modern Standby lists the ways a Windows PC enters sleep: pressing the power button, closing the lid, idling out, or choosing Sleep from the Start menu. The lid is just one more trigger for the same state.
Sleep is the part that matters for alarms. In sleep the laptop keeps your open apps in memory and powers almost everything else down. Software isn't running. A clock app can't count, a browser tab can't fire a timer, and no sound plays, because the thing that would play it is not executing. An alarm is a program waiting for a time to arrive, and a program can't wait while the machine it runs on is paused.
There are three states worth separating, because the fix is different for each:
- Awake, lid open, screen dim or off. Everything runs. An alarm in the Clock app or in a browser tab will ring on time. This is the state you want.
- Asleep (lid closed, or idle sleep). Nothing runs. Alarms don't ring unless the system is also set to wake itself, which is hardware and settings dependent.
- Shut down or hibernating. Also nothing running, and there is no reliable way for a normal alarm to start it back up.
Most "my alarm failed" stories are state 2, and most of them started with a lid or an idle timer rather than with the alarm itself. If the alarm was a browser tab, there is a further catch covered in whether online timers keep running in background tabs: a tab can be throttled, frozen or discarded even on an awake machine. That is a smaller risk than sleep, but it is the reason the setup below keeps the alarm tab visible and in front.
Does the Windows Clock app wake a sleeping laptop?
Not by itself, and this surprises people because the Clock app sounds like it should. The alarms in the Windows Clock app are ordinary app behaviour. When the PC is asleep the app isn't running, so there is nothing to ring.
You can see the complaint in Microsoft's own support community, in a thread titled Make Clock App Alarms Work During Sleep Mode. The poster set an alarm and it stayed silent in sleep. The workaround discussed there is a two-part setup: allow wake timers in the advanced power plan settings (Sleep, then Allow wake timers, on battery and plugged in), and add a scheduled task that wakes the PC a few minutes before the alarm so the Clock app is running when its time arrives. One person in that thread points out the obvious risk: if the PC wakes and goes back to sleep immediately, the alarm still misses.
I'd treat that as a hobbyist trick rather than a plan. It depends on your power plan, on your laptop's firmware honouring wake timers, and on the machine not drifting back to sleep, none of which you can verify from bed. It also needs the laptop to stay plugged in, because a laptop that wakes on battery overnight and runs flat is its own failure.
What Microsoft does document is the sleep timer itself. The Windows 11 power settings guide shows where the screen and sleep timeouts live (Settings, System, Power & battery, Screen, sleep & hibernate timeouts), with separate values for battery and plugged in. Those two settings are the ones that matter for an overnight alarm, because they decide whether your laptop sleeps by itself while you do.
Can a MacBook alarm ring with the lid shut?
This is the one question where the sources disagree, so here is what I can and can't say.
Apple's sleep and wake settings guide documents the controls you can reach: how long the Mac waits before sleeping, a switch to stop automatic sleeping on the power adapter when the display is off, and an option to let a sleeping Mac wake briefly for network access. What I couldn't find on any Apple page is a statement that the Clock app's alarms will wake a sleeping Mac and ring with the lid closed. Because I can't confirm it from Apple, I won't promise it.
Other sources split. A utility maker's blog says a scheduled Clock alarm normally wakes the Mac and rings with the lid closed. Apple's own community forum has an answer saying a MacBook alarm won't go off from sleep without a third-party app, and a tech site makes the same claim. These may describe different macOS versions, different Mac models, or different conditions (plugged in versus battery, Power Nap on or off). The honest summary is that a Mac may wake for an alarm in some setups, nobody outside Apple can tell you whether yours will, and you find out by failing at 6 AM, which is the worst test.
If you want a Mac alarm you can rely on, remove the question: keep the Mac awake and the lid open, the same as any other laptop. Apple's documented route is the "prevent automatic sleeping on power adapter when the display is off" switch in the battery options on a laptop, which lets the display turn off while the Mac itself stays awake. That is the state you want: screen dark, machine running.
How do you keep a laptop awake with the lid closed?
You can, but it is the less safe option, and it is worth knowing why before you do it.
On Windows the lid action is a setting. In Control Panel under Power Options there is a "Choose what closing the lid does" page, with separate choices for battery and plugged in. Setting the plugged-in choice to "Do nothing" keeps the laptop running when you close it. Menu names and availability vary between machines and Windows versions, so check your own.
On a Mac laptop, the documented way to keep the machine running through a closed lid is to use it with an external display and power attached, which is the arrangement people call clamshell mode. I could not retrieve Apple's page for that setup, so I won't give you steps from memory. Check Apple's support site for your model.
On a Chromebook there is a power setting for what happens when the lid closes on many models. I couldn't confirm the exact wording from Google's help pages, so look in Settings, then System preferences, then Power on your own device.
Here is why this isn't the setup I'd recommend for an overnight alarm. A laptop running with the lid shut has nowhere to put its heat, since the keyboard deck and vents are covered and many laptops exhale through the hinge area. You also lose the one thing a lid-open laptop gives you for free: you can see it is awake. If the lid is shut, you can't tell the difference between "running, will ring" and "asleep, won't" until it fails.
Which devices ring in which states?
This is the table I wish existed when I first tried this. It covers the three common laptop families across the four states people actually leave them in, for a built-in clock app and for an alarm in a browser tab. A "no" in the sleeping rows is the default behaviour; the "depends" cells are the ones where the answer turns on hardware, version or settings that vary.
| Device | State | Built-in Clock alarm | Browser alarm | What to change |
|---|---|---|---|---|
| Windows laptop | Lid open, screen dim or off, awake | Rings | Rings, if the tab is visible and in front | Raise the screen-off timer; keep the machine awake |
| Windows laptop | Lid closed, on battery | No, the default lid action is sleep | No | Leave the lid open, or change the battery lid action (not recommended) |
| Windows laptop | Lid closed, plugged in | No by default; depends on the lid action and wake timers | No | Set the plugged-in lid action to "Do nothing", or better, leave the lid open |
| Windows laptop | Shut down | No | No | Use a phone alarm |
| MacBook | Lid open, display off, awake | Rings | Rings, if the tab is visible and in front | Use the "prevent automatic sleeping" option while on power |
| MacBook | Lid closed, on battery | Depends; sources disagree and Apple does not document it | No | Leave the lid open |
| MacBook | Lid closed, plugged in | Depends; sources disagree and Apple does not document it | No | Leave the lid open, or use an external display setup |
| MacBook | Shut down | No | No | Use a phone alarm |
| Chromebook | Lid open, screen dim or off, awake | Rings, if the clock app or tab is running | Rings, if the tab is visible and in front | Raise the idle timers in Power settings |
| Chromebook | Lid closed, either power state | Depends on the model's lid setting | No while asleep | Check the lid setting on your model, or leave the lid open |
| Chromebook | Shut down | No | No | Use a phone alarm |
Two things stand out. In every sleeping or shut-down row, the browser alarm is a flat no, because it is the most dependent of all the options: it needs the machine awake and the tab alive. And in every awake row, the built-in app and the browser alarm both work, which tells you that the machine's state decides the outcome, not which alarm you picked.
Does a browser alarm work overnight?
Yes, under three conditions, and all three are within your control.
First, the machine has to stay awake. That means the lid open and the sleep timer long enough, or set to never, while plugged in. Second, the alarm tab has to be the visible tab in the front window, not a background tab, a minimised window or a tab inside a window sitting behind another. Third, the display can go dark or dim without harm, but the system must not sleep.
The part a web page can do for you is the display. Browsers have a standard called the Screen Wake Lock API, which lets a visible page ask that the screen not dim, turn off or lock. MDN's documentation notes it applies to visible, active documents and that the system can release the lock, for example when the battery is low. Our online alarm clock page requests this while an alarm is armed, so the screen stays on and the tab stays in front without you touching a setting. I covered the limits of that request, and what it can and can't do on phones, in keeping the screen awake while a timer runs.
A wake lock keeps the display on. It does not defeat a lid-close, a power button or a dead battery, which is the right design: a web page shouldn't be able to hold a closed laptop awake in a bag. So the lid and plug are your half of the arrangement, and the page does the other half.
What's the safest overnight alarm setup on a laptop?
Treat the laptop as the primary alarm only when you can see it is awake, and add a second independent alarm so one failure doesn't cost you the morning.
- Leave the lid open. An open lid is the signal you can check at a glance: if the screen is lit or the keyboard backlight is on, the machine is awake.
- Plug in. An alarm that runs on battery all night is fine until the battery runs out. On the charger there is no countdown.
- Arm the alarm and open it full screen. Open the online alarm clock, set the time, and put the tab front and centre, in its own window if you can. Turn the volume up and test it once before bed.
- Stop the sleep, not the screen. Raise the sleep timer for plugged-in use and leave the screen-off timer short. Dark screen, awake machine.
- Keep a phone alarm as the backup. A phone is built for this job and keeps ringing when locked. If the laptop alarm is the one you care about, the phone is the safety net, set a few minutes later.
- Don't rely on the closed-lid workaround. If you must have the lid shut, test the setup the night before at a time you can afford to fail.
If you have trouble waking up even when the alarm does ring, that is a different problem, and why you sleep through your alarm covers it.
Frequently asked questions
Can I use my laptop as an alarm clock overnight?
Yes, with the right setup: lid open, plugged in, the machine set not to sleep, and the alarm tab in front. The risk is the machine falling asleep, not the alarm failing. Add a phone alarm a few minutes later as a backup, so a missed laptop alarm does not mean a missed morning.
Does a Mac alarm work in sleep mode?
I can't confirm it, and Apple's sleep and wake documentation doesn't say that Clock alarms wake a sleeping Mac. Some third-party sources say it works on some setups and others say it doesn't, so don't count on it. If the Mac must ring at a set time, keep it awake with the lid open and the "prevent automatic sleeping" option on while plugged in.
Will a browser alarm work if my computer goes to sleep?
No. A sleeping computer runs no programs, so a browser tab can't fire an alarm. The tab, the page and the alarm are all paused until the machine wakes. Keep the computer awake and the alarm tab visible, or use a phone for the times when you can't.
Is it safe to leave a laptop open and plugged in all night?
It is a common arrangement, and the main risks are heat and battery wear, not danger. Keep it on a hard, flat surface, never on a bed or a pillow where the vents can be blocked, and check your manufacturer's guidance for your model. Some laptops have a battery care setting that limits charging, which suits a laptop that lives on the charger.
Set it up before bed
Leave the lid open, plug in, and arm the online alarm clock full screen before you sleep. Test it once with an alarm two minutes out, then set the real one, and put your phone alarm a few minutes behind it.