Free Moon Phase Widget for Your Website

Tonight's Moon for any city, on your own site, in one line of code

Pick a city and a theme, copy the snippet, paste it into any page, blog post or sidebar. The widget shows the Moon as it looks tonight, how much is lit, moonrise and moonset, and the next full moon. It updates itself every day and needs no account, key or plugin.

1. Choose a city

2. Choose a theme

3. Copy the code

Paste it where you want the widget to appear. In WordPress use a Custom HTML block; in most other builders an "HTML" or "embed code" element. The credit line stays with the widget so your readers can see the full calendar for their own city.

Preview

How it works

The snippet is a small block of HTML plus one script. When the page loads, the script asks this site for today's Moon in the city you chose, computed for that city's time zone, and draws the widget in place. If the script cannot load, visitors still see the plain credit link, so nothing on your page breaks. Times are in the city's local time, in the same format as the moon calendar here.

Fair use

The widget is free for personal and commercial sites, with two conditions: keep the credit line as it is, and do not change the data it shows. If you would like a size, colour or layout it does not offer yet, tell us; useful requests get built.

Questions

Does it slow my site down?

No. The script is under 4 KB, loads asynchronously, and the data it fetches is a single small request served from a cache.

Can I put several on one page?

Yes. Paste a snippet for each city; the script only needs to be included once, and extra copies are ignored.

Which cities are available?

Any city on this site, about 6,000 worldwide. The search box above finds them. The value in data-city is the same as the end of the city's moon phase page address, for example us/new-york.

Choose your location

Moon times, dates and names depend on where you are. Pick a city; we will remember it.

Popular cities