A worked example, rendered from real sample data. Sign in to run the tool on your own input.
2026-12-31T23:59:59ZTime until 2026-12-31T23:59:59.000Z:
102d 11h 52m 27s (8855547s total)
── Embed-ready HTML + vanilla JS ──
<div id="cd" data-target="2026-12-31T23:59:59.000Z">
<span data-d>102</span>d
<span data-h>11</span>h
<span data-m>52</span>m
<span data-s>27</span>s
</div>
<script>
(function(){
var el=document.getElementById('cd'),t=new Date(el.dataset.target).getTime();
setInterval(function(){
var n=t-Date.now();if(n<0)return;
el.querySelector('[data-d]').textContent=Math.floor(n/86400000);
el.querySelector('[data-h]').textContent=Math.floor((n%86400000)/3600000);
el.querySelector('[data-m]').textContent=Math.floor((n%3600000)/60000);
el.querySelector('[data-s]').textContent=Math.floor((n%60000)/1000);
},1000);
})();
</script>
Build a live <div>-and-JS countdown to any ISO target timestamp. Part of the DevTools Surf developer suite. Browse more tools in the Date / Time collection.