Sunrise and sunset times on your website
A free widget that shows the sunrise and sunset times for your chosen place, every day. Pick a city, copy the code and paste it into your page.
Preview
Code to paste
How to add it
- Pick the place and the style.
- Copy the code.
- Paste it into your site as an HTML block. In WordPress, use the "Custom HTML" block.
What it shows
- Today’s sunrise, sunset and day length, with the change since yesterday.
- A day arc with the sun’s position and a countdown to the next sunrise or sunset.
- The evening golden hour and tomorrow’s sunrise and sunset.
- No cookies, no tracking, no ads. The times are calculated in the browser and nothing is sent to any server.
Useful for hotels, campsites, marinas, schools, churches, local news sites and photographers.
FAQ
Is it free?
Yes, commercial sites included. We only ask you to keep the Zenitmap link that comes with the code.
Does it work on WordPress, Wix or Blogger?
Yes, on any page where you can paste HTML. If your site blocks scripts, the code still shows the text with the link.
Where do the times come from?
We calculate them from the coordinates of the place, the same way as the Sky tonight pages on Zenitmap (astronomical formulas from the SunCalc library). Sunrise and sunset are the moments when the upper edge of the sun is on the horizon, allowing for refraction in the atmosphere.