For most of my twenties I slept through alarms. Not the odd morning, most mornings, through two phones and a clock radio. I do not sleep through them anymore, and part of what fixed it was making the alarm harder to stop than it was to sleep through. This is that alarm, as a web page.
Set a time, leave the tab open, and it rings. If you want to, make it ask you a math problem before it goes quiet.
How it works
Pick the time and press Set alarm. The page counts down to the next time that clock shows, tonight or tomorrow morning, whichever comes first. The countdown is on the page so you can see it is running.
When the time comes, the sound starts quiet and gets louder over a minute, in six steps. The first step is soft enough that a light sleeper wakes and turns it off before it bothers anyone. The last step is a square wave at full volume, which is the one that gets me. It stays there until you stop it or snooze it.
If you let the browser send notifications, it also posts one when the alarm goes off, so a hidden tab still gets your attention on a laptop. The page asks for that permission when you set the alarm, not when you open the page, and it never asks twice.
While the alarm is set, the page asks the browser to keep the screen on. That is what stops a phone on a nightstand from dozing off before you do.
Everything it remembers, it remembers in this browser: the time, the label, the snooze length, whether math is on, and when the alarm is due. Nothing goes to a server, because there is no server. Reload the page and the alarm is still set. Close the tab and come back and it tells you whether it went off while you were away.
The honest limits
This is JavaScript in a page. It rings while the page is open, either in this tab or as the installed app. On a laptop or a desktop a background tab is fine; the sound and the notification both come through. On a phone, the screen wake lock keeps it alive while the page is in front, but a locked phone is not guaranteed. Some phones keep the page ticking for hours, most freeze it within a minute or two, and I have no way to tell you which yours will do.
There is no server push and no way for me to wake your phone from outside. That is the whole gap between a web alarm and the one built into your phone, and it is one reason I am building a real alarm app for heavy sleepers. It is not ready and I am not going to put a sign-up box here to pretend it is. For now, if the morning matters, set your phone's alarm as well and use this one at a desk, or as the backup that makes you do arithmetic.
Math to stop
The Stop button is easy to hit with your eyes shut. I know because I did it for years without waking up, and I have no memory of any of it.
Tick "Solve a math problem to stop it" and the alarm asks you something like 23 + 41 or 7 x 8. Get it wrong and it keeps ringing and asks again. Get it right and it stops. Snooze does not need the answer, so you can still buy yourself a few minutes, but the snooze then comes back with a new problem.
The first week I tried this on myself I got 8 x 7 wrong twice at 5:40 a.m. with Waffles standing on my chest. By the third morning I was answering before the second beep. The point is not the arithmetic. It is that you cannot do it asleep, and once you have done it you are not asleep anymore.
Popular times
The alarm has its own page for every minute of the day, so you can bookmark the one you use. The ones most people set: 6:00 a.m., 6:30 a.m., 7:00 a.m., 7:30 a.m. and 8:00 a.m..
If you know when you need to be up but not when to turn the light off, the sleep calculator counts back from the alarm in sleep cycles. I wrote up the research behind that arithmetic in what time should I go to bed. And if you are setting an alarm because you have not slept properly for weeks, the alarm is not the problem. That is one for a doctor, and I am not one.