How a countdown timer in your email actually works
The first time you see a countdown timer ticking inside an email, it feels like it shouldn't be possible. Emails are supposed to be static. You can't run code in them. So how does the clock know what time it is?
The answer is simpler, and cleverer, than most people expect. Here's how a countdown timer in your email works, in plain English, and what that means for using one well.
Emails can't run code
Start with the constraint. Email clients like Gmail, Outlook, and Apple Mail block JavaScript and most other code inside emails. That's a security decision. If emails could run scripts, every inbox would be a playground for attackers.
So a countdown in an email can't work like a countdown on a website, where a small program in the page updates the numbers every second. There's nothing inside the email that can do the counting.
The trick: the clock lives on a server
What emails can do is load images from the internet. Every newsletter with a picture in it does this. The email contains an address, and when you open the email, your mail app fetches the image from that address.
A countdown timer uses exactly that. The "timer" in your email is an image address pointing to a timer service like Alterable. When a subscriber opens the email, their mail app requests the image. The server receives the request, checks the current time, calculates how long is left until your deadline, draws an image showing that, and sends it back.
All of this takes a fraction of a second. To the reader, a countdown simply appears.
Why it's always correct
Because the image is drawn fresh each time it's requested, it's correct at the moment of every open. Open the email Monday morning and it says three days left. Open the same email Wednesday and it says one day. Nobody resent anything. The same image address produced a different picture because the server drew it at a different time.
That's the part that makes timers so useful. The email you sent on Monday is still accurate on Wednesday.
Animated versus still timers
There are two ways the server can draw the timer.
Many services draw an animated GIF: the current time left, plus the next 60 or so seconds as separate frames, played in sequence so the seconds appear to tick. It looks lively. But some email clients, notably classic desktop Outlook on Windows, only show the first frame of a GIF, so the timer appears frozen there.
Alterable draws a still image showing the exact time left at the moment of opening. There's no animation, but there's also nothing for any inbox to freeze. Every reader, in every email client, sees the same clean countdown. Reopen the email and it's redrawn with the new time.
What happens at the deadline
When the deadline passes, the server knows. It can draw a timer stuck at zero, or something more useful. With Alterable, you can set an expiry message, like "This offer has ended," or swap in a completely different image, such as a banner pointing to your next sale. Anyone opening the email late sees that instead of a countdown to something that's gone.
Because it all happens on the server, you can even change what the expired state shows after the email has been sent.
Personal countdowns
Since the server draws a new image on every request, it can also draw different images for different people. There are two common ways.
An evergreen timer gives each subscriber their own countdown starting from their first open. The image address includes a unique ID for each subscriber, filled in by your email platform, so the server can remember when that person first opened and count down from there.
A merge tag timer counts down to a date stored on each subscriber's record, like the end of their free trial. That date is written into their copy of the image address, so each person sees their own deadline.
How you add one to your email
- Create the timer in a tool like Alterable: set the deadline, timezone, design, and what happens after the deadline.
- Copy the embed code it gives you. It's an image tag wrapped in a link.
- Paste it into an HTML or code block in your email platform: Mailchimp, Klaviyo, HubSpot, and so on.
- Send a test, open it, wait a few minutes, and open it again to see the time change.
Alterable's free plan includes 10,000 impressions a month with no watermark, and there are setup guides for the major email platforms.
A few things worth knowing
Some people block images, so write alt text like "Sale ends Sunday at midnight" and mention the deadline in live text too. Gmail and Apple Mail fetch images through their own servers for privacy, but timer services tell those servers not to keep old copies, so timers stay accurate. And put the timer right above your main button, because that's where it helps someone decide.
Why it works so well
A timer turns an abstract deadline into something concrete and visible. "Ends Sunday" is easy to ignore. "1 day, 4 hours, 12 minutes" isn't. And because it's always accurate at the moment of reading, it's honest urgency, not the fake kind.
Now that you know how it works, the fun part is watching one update in your own inbox. Send yourself a test, open it, wait ten minutes, and open it again.