A sale is about to start, a product is launching, or an event date is fixed, and you want visitors to see the clock. This guide shows you how to add a countdown timer to your website without paying for a plugin or hiring a developer.

You will get a copy-and-paste snippet, steps for the popular site builders, and a dated launch plan. If you want to check your days left or plan the date first, try the free online countdown timer.

What is the easiest way to add a countdown timer to your website?

The easiest free method is to paste a short block of HTML and JavaScript into a custom HTML or embed block on your page. It needs no plugin, no account, and no coding skills, only a copy-and-paste and one edited date. It works on most site builders and loads faster than most widgets.

There are three routes, and each suits a different situation:

  1. Paste a snippet. Free, fast, and you control the look. Best for one or two timers.
  2. Use your builder's built-in timer or embed block. Some builders and themes include a countdown element. Availability varies by plan and theme.
  3. Install a plugin or app. Useful if you need many timers, design templates, or automatic resets, but extra scripts can slow your pages.

For most small sites, the snippet is the right start. You can always switch later.

How do you add a countdown timer with copy-and-paste HTML?

Copy the snippet below, change the date and time, and paste it into a custom HTML block on your page. Save, preview, and test on your phone. The timer counts down live in the visitor's browser, so it needs no server, no plugin, and no account.

Here is the snippet. It counts down to 00:00 on Friday, 27 November 2026 (Black Friday):

```html <div id="countdown" role="timer" style="font-size:2rem;text-align:center;"> Loading... </div> <script> var target = new Date("2026-11-27T00:00:00-05:00").getTime(); var box = document.getElementById("countdown");

function tick() { var diff = target - Date.now(); if (diff <= 0) { box.textContent = "The sale is live!"; return; } var d = Math.floor(diff / 86400000); var h = Math.floor((diff % 86400000) / 3600000); var m = Math.floor((diff % 3600000) / 60000); var s = Math.floor((diff % 60000) / 1000); box.textContent = d + " days " + h + " hrs " + m + " min " + s + " sec"; setTimeout(tick, 1000); } tick(); </script> ```

Follow these steps:

  1. Choose your target moment. Decide the date, the exact time, and the time zone.
  2. Edit one line. Change the date inside `new Date("...")`. The format is year, month, day, a "T", then the time, then the offset.
  3. Change the message. Replace "The sale is live!" with whatever should appear when the timer ends.
  4. Paste it into a custom HTML or embed block on the page where you want the timer.
  5. Save and preview. Check that the numbers change every second.
  6. Test on your phone and in a private browser window.

The time zone part matters. If you leave the offset off (for example `-05:00`), each visitor's browser uses their own local time, so people in London and New York would see the sale start at different moments. Add the offset when the event happens at one fixed moment, such as a launch or a live event. Leave it off when you want everyone to reach zero at their own local midnight, such as a New Year countdown.

How do you embed a countdown timer in WordPress, Wix, Squarespace, and Shopify?

Every major builder has a block that accepts custom code: add that block where you want the timer, paste the snippet, and save. The name changes by platform, so look for "Custom HTML", "Embed", or "Code". Some plans restrict custom code, so check your plan first.

Here is where to look on common platforms:

  • WordPress: In the block editor, add a Custom HTML block and paste the snippet. Preview before you publish.
  • Wix: Use Embed code (an HTML element) from the Add menu, then paste the snippet and resize the box.
  • Squarespace: Add a Code block and paste the snippet. Custom code availability depends on your plan.
  • Shopify: Add a Custom Liquid or custom HTML section in your theme editor, or edit the relevant template if you are comfortable doing so.
  • Webflow: Drag an Embed element onto the page and paste the snippet.

Block names and menu locations change over time, so if you cannot find the option, search your builder's help pages for "custom code" or "embed HTML".

If your builder does not allow custom code at all, you have two options: use its built-in countdown element if it has one, or link to a hosted timer page. Some pages can be embedded in an inline frame (an iframe), but many sites block this for security reasons, so a plain link is the safer fallback.

Which method should you choose?

Choose the method that matches how many timers you need and how much control you want. A pasted snippet suits one or two timers on a small site. A built-in block suits anyone whose builder offers one. Plugins suit many timers with automatic resets, at the cost of extra scripts and sometimes a fee.

MethodCostSkill neededBest forWatch out for
Pasted HTML snippetFreeCopy and pasteOne or two timers on a pageYou edit the date by hand
Builder's built-in blockFree or included in your planLowSites whose builder offers oneFeatures differ by plan and theme
Plugin or appFree tier or paidLow to mediumMany timers, templates, design optionsExtra scripts can slow pages
Embedded timer page (iframe)FreeLowShowing a hosted timer pageMany sites block embedding; sizing issues

What to look for:

  • Exact time and time zone control, not just a date
  • Fast loading and a small amount of code
  • A clear message for when the timer ends
  • Mobile-friendly sizing

What to avoid:

  • Plugins that load large scripts on every page when you need one timer
  • Timers that reset for each visitor (see the honesty section below)
  • Tools that ask for your login or personal data just to show a clock
  • Anything you will forget to turn off after the event

Where should you put the countdown timer on the page?

Put the timer where visitors will see it without scrolling, close to the action you want them to take. For a sale, that means a banner or hero section near the buy button. For an event, place it beside the sign-up form. Keep one main timer per page to avoid clutter.

A few placement rules that work:

  • Above the fold. If visitors must scroll to find it, it will not create urgency.
  • Next to the call to action. Pair "Sale starts in 28 days" with a "Notify me" button or email sign-up.
  • Readable on mobile. Test at a small width, because long strings of numbers can wrap or overflow.
  • Plain language. "Black Friday sale starts in" beats a bare string of numbers.
  • One timer per goal. Several clocks on the same page compete with each other.

If you have a home page and a landing page, use the same date and time on both so visitors never see two different answers.

What does a launch plan look like? A dated example

Work backwards from the date your timer should reach zero. Add the timer to a draft page early, test it, publish a "coming soon" page, then promote it. The example below counts down to Black Friday on Friday, 27 November 2026, which is 49 days from Friday, 9 October 2026.

  • Fri 9 Oct (49 days left): Decide the offer, pick the exact date, time, and time zone, and check which code block your builder offers.
  • Fri 16 Oct (42 days left): Add the timer to a draft page and test it on your phone and in two browsers.
  • Fri 30 Oct (28 days left): Publish a "coming soon" page with the timer and an email sign-up.
  • Fri 13 Nov (14 days left): Add the timer to your home page banner and mention it in your newsletter.
  • Fri 20 Nov (7 days left): Run a final test, including the end message and your time zone.
  • Thu 26 Nov (1 day left): Change the banner text to "Starts tomorrow" and make sure the sale page is ready.
  • Fri 27 Nov (0 days left): The timer ends, your end message shows, and the sale goes live.
  • Mon 30 Nov: Cyber Monday. Update or remove the timer so it does not show an old date.

The last step is the one people forget. An expired timer that still shows zero, or a negative number, makes a site look neglected. Add a reminder to your calendar to remove or replace the timer the day after the event.

For seasonal sites, you can reuse the same method for the holidays. A Christmas countdown on a shop page, for example, only needs a new date in the snippet.

How do you keep a website countdown honest and accessible?

Count down to a real date that does not change per visitor, and say what happens when the timer ends. Avoid timers that reset every time someone arrives, because that is false urgency, and some countries treat it as misleading marketing. Add the date in plain text too, so everyone can read it.

Here is a short honesty and accessibility checklist:

  • Use real deadlines. If the offer continues after the timer ends, do not describe it as ending.
  • Avoid per-visitor resets. A timer that always shows "24 hours left" is deceptive, and it damages trust once visitors notice.
  • Write the date in text. For example, "Sale starts Friday, 27 November 2026 at midnight Eastern". Screen readers and visitors with scripts disabled will still see it.
  • Keep contrast high. Large numbers on a clear background are easier to read.
  • Do not flash or animate wildly. Calm numbers are enough.
  • Check local rules. Consumer protection rules differ by country, so confirm what applies to your promotions.

For work and team projects, you can also keep deadlines visible on an internal page, which pairs well with a deadline countdown timer for teams.

Why is your countdown timer not working?

Most problems come from five causes: the builder stripped the code, the date format is wrong, the time zone is missing, the script is in the wrong place, or the page is cached. Check each in order, starting with the simple ones.

  1. The block shows the code as text. You pasted into a normal text block. Use a Custom HTML or Embed block instead.
  2. The timer shows "NaN" or nothing. The date format is wrong. Use year, month, day, "T", then the time, like `2026-11-27T00:00:00-05:00`.
  3. The timer is off by several hours. The time zone offset is missing or wrong. Add the correct offset, and remember that offsets change with daylight saving time.
  4. Nothing appears on the live page, but the preview works. Clear your site cache and your browser cache.
  5. The timer disappears on some pages. Your builder or theme may strip scripts in certain sections. Move the block to a standard page body area.

If you still have trouble, simplify first: paste only the snippet into a blank test page, confirm it works there, then add it back to your real page.

Add your countdown timer today

Now you know how to add a countdown timer to your website: paste the snippet, set an exact date and time zone, place the clock near your call to action, and remove it when the event ends. The whole job takes about ten minutes for a first timer.

Start by planning the date with the free online countdown timer, then add the clock to your page and test it on your phone.