Online Alarm Clock — Free, No Signup, Runs in Your Browser
Set one alarm or twelve. Pick a sound, choose which days it should repeat, and snooze when it rings. The countdown stays accurate even when the tab is in the background, and nothing leaves your device.
How it works
The alarm clock is a thin layer over three browser APIs that have been part of the web platform for over a decade: the JavaScriptDate object for wall-clock time, the Web Audio API for synthesised sound, and localStorage for persistence. There is no server. Open the page, set an alarm, close every other tab — the alarm still rings.
The next-fire computation is the most error-prone part of any alarm clock. We compute it two independent ways and show the "cross-checked" badge only when both agree. Algorithm one (used by the UI) walks calendar days:
- Start at offset 0 (today). Build a candidate Date at HH:MM:00.000 on that day.
- If the candidate is earlier than "now", advance to the next day. Otherwise it's a valid candidate.
- For a recurring alarm, also require that the candidate's weekday is in the alarm's day set. If not, advance.
- Repeat for up to 7 day offsets. The first day that satisfies the day-set is the next fire time.
Algorithm two scans minute-by-minute from floor-now-to-minuteup to eight days in the future (worst-case 11,520 iterations). It returns the first minute whose hour, minute, and weekday all match, where the candidate timestamp is not earlier than "now". The two algorithms produce the same Date for every alarm we've tested, including the tricky cases below — midnight, exact-second boundaries, weekend-only alarms set on a weekday.
When an alarm fires, the audio playback loop schedules one cycle of the chosen sound (each cycle is the frequency list × 0.45 s per step) and re-schedules every cycle on a setInterval until the user clicks Stop. Snooze does not modify the alarm — it sets an internal "next-fire-at" deadline 5 minutes ahead, stops the current sound, and lets the tick loop catch the deadline and fire again. The original recurring schedule is unchanged.
Tab-title updates use a deterministic format — HH:MM in 1h 30m — induwara.lk — so you can pin the tab and check the countdown without switching context. The format collapses sensibly at long durations (days) and tightens to seconds in the final minute.
Worked examples
Frequently asked questions
Sources & references
- W3C HTML Living Standard — <input type='time'> (24h normalised value)
- W3C Web Audio API — chime synthesis (sine, square, triangle oscillators)
- W3C Web Notifications API — opt-in system pop-ups
- ECMAScript — Date.prototype.getDay() (0 = Sunday)
Behaviour last cross-checked on 2026-05-11. APIs used here have been stable web platform features for over a decade; this page is reviewed annually or when a relevant spec change ships.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.