Free forever · No ads · No tracking

Prayer times widget for your website

Accurate salah times, the Hijri date and a live countdown to the next prayer. One line of code, any website, free forever.

Live preview

This is the real widget, rendered from the settings on the right. It updates every second and rolls over at midnight in your chosen timezone.

Configure

Or type coordinates below.

Paste it where you want the card to appear: a page, a sidebar, a footer, a WordPress Custom HTML block, Squarespace or Wix code block, or any CMS that accepts HTML.

For mosques and community sites

Most prayer-time widgets come with advertising, third-party trackers, or a monthly fee once your site grows. This one is different. Niyyara is a free worship app that does not monetize worship, and this widget follows the same rule.

Free foreverNo fee, no premium tier, no usage cap for a normal website. Funded by Four Cents, the studio behind Niyyara.
No ads, no trackingThe script sets no cookies, loads no analytics, and sends nothing about your visitors anywhere. The only request is for the day's times.
Fast and safeAbout 11 KB, no dependencies, loads asynchronously, renders in its own Shadow DOM so your site's CSS and the widget never interfere with each other.
AccurateSame engine and settings as the Niyyara app. Twelve calculation methods, Shafi or Hanafi Asr, high-latitude and polar handling built in.
10 languagesEnglish, Arabic, Urdu, Hindi, Bengali, Indonesian, Malay, Turkish, French and Persian, with right-to-left layout where needed.
Always currentLive countdown to the next prayer, next-prayer highlight, and automatic rollover at midnight in your timezone.
The one thing we ask. Please keep the small "Prayer times by Niyyara" line at the bottom of the card. That credit link is the only thing we get back for hosting and maintaining the widget and its API, and it helps other communities find a free tool.

Options

Every option is a data- attribute on the script tag. Only data-lat and data-lng are required.

AttributeValuesNotes
data-lat, data-lngdecimal degreesRequired. Use your building's coordinates for the most accurate times.
data-tzIANA zone, e.g. America/TorontoRecommended. If omitted, the visitor's browser timezone is used, which is usually right for a local mosque site.
data-methodMuslimWorldLeague (default), NorthAmerica or ISNA, Egyptian, Karachi, UmmAlQura, Dubai, Kuwait, Qatar, Singapore, Turkey, Tehran, MoonsightingCommitteePick the convention your community follows. North America usually uses ISNA; South Asia usually Karachi; the Gulf its national method.
data-madhabshafi (default), hanafiOnly affects Asr.
data-themelight (default), dark, autoauto follows the visitor's system setting.
data-langen, ar, ur, hi, bn, id, ms, tr, fr, faPrayer names and dates are localized. Defaults to the page language, then English.
data-clock12, 24Force a clock style. By default the language's own convention is used.
data-titletextReplaces the "Prayer Times" heading, for example with your masjid's name.
data-widthfullBy default the card is at most 400px wide and fluid below that. full lets it fill its container.

Prayer times API

The widget is powered by a small public JSON API you are welcome to use directly, for example to print a monthly timetable or to feed a display screen in the prayer hall. No key needed. Please cache responses (they are already served with a 5 minute cache header) and keep traffic reasonable.

GET https://niyyara.com/api/prayer/times?lat=43.65&lng=-79.38&tz=America/Toronto&method=ISNA&madhab=shafi&date=2026-09-13
ParameterNotes
lat, lngRequired. Decimal degrees, validated to the normal ranges.
tzRequired. An IANA timezone name. The API does not guess the zone from coordinates (that needs a large boundary database), so send it explicitly.
method, madhabSame values as the widget. Friendly aliases such as ISNA, MWL and Makkah are accepted.
dateYYYY-MM-DD in that timezone. Defaults to today.

Response (abridged):

{
  "date": "2026-09-13", "timezone": "America/Toronto",
  "hijri": { "day": 2, "month": 4, "year": 1448, "monthName": "Rabiʻ II", "text": "2 Rabiʻ II 1448 AH" },
  "method": "NorthAmerica", "methodLabel": "ISNA (North America)", "madhab": "shafi",
  "times": { "fajr": "2026-09-13T09:34:00.000Z", "sunrise": "...", "dhuhr": "...", "asr": "...", "maghrib": "...", "isha": "..." },
  "local": { "fajr": "05:34", "sunrise": "06:55", "dhuhr": "13:14", "asr": "16:44", "maghrib": "19:31", "isha": "20:52" },
  "tomorrow": { "fajr": "2026-09-14T09:35:00.000Z", "fajrLocal": "05:35" },
  "next": { "key": "isha", "at": "2026-09-14T00:52:00.000Z", "local": "20:52", "tomorrow": false, "minutesLeft": 73 }
}

Responses carry Access-Control-Allow-Origin: *, so you can call the API from browser code on any domain. GET /api/prayer/methods lists the supported methods.

Frequently asked questions

How accurate are the prayer times?

The widget uses the same open-source astronomical engine (adhan) and exactly the same settings as the Niyyara app, with the calculation method and madhab you choose. Times are computed for your exact coordinates and timezone, so they agree with the app and with most established timetables to the minute. Two honest caveats: some mosques apply small manual offsets or fixed jamaat times, which the widget cannot know about, and at very high latitudes every method involves a convention (we use the same seventh-of-the-night rule as the app above 48 degrees).

Which calculation method should I choose?

Use whatever your community already follows. As a rule of thumb: ISNA in the United States and Canada, Muslim World League in Europe and most of the world, Karachi in Pakistan, India and Bangladesh, Umm al-Qura in Saudi Arabia, Egyptian in Egypt and much of the Arab world, Diyanet in Turkey, Singapore in Singapore, Malaysia and Indonesia. The configurator pre-selects a sensible method when you pick a city.

What does the madhab setting change?

Only the Asr time. The standard setting (used by the Shafi, Maliki and Hanbali schools) places Asr when an object's shadow equals its length; the Hanafi setting waits until the shadow is twice the length, which is typically 40 to 70 minutes later.

Does it work offline or without JavaScript?

No. The widget is JavaScript and fetches the day's times from niyyara.com once a day (and again after midnight). If the request fails it shows a short message instead of a broken card, and it never throws errors into your page. If you need a static, no-script timetable, call the API from your own server and print the result.

Can I remove the "Prayer times by Niyyara" line?

We ask that you keep it. That small credit link is the only thing we get back for hosting and maintaining the widget and the API for free, with no ads and no tracking, and it is how other communities discover a free tool. It is deliberately quiet: one short line at the bottom of the card, styled to match. If your organisation genuinely cannot show any third-party credit, please email hello@niyyara.com and we will talk.

Does the widget track my visitors?

No. It sets no cookies and loads no analytics. The only network request is for the prayer times themselves, and the only thing in it is the location and settings you configured. Our server logs are standard web-server logs, kept briefly for security, and are never sold or shared. The credit link carries a plain UTM tag so we can see that visits came from an embed, and nothing more.

Can I style it to match my site?

Choose the light or dark theme and, if you like, set data-width="full" so it fills a sidebar. The card is isolated in a Shadow DOM, which is what keeps it looking right on every site, so custom CSS is not supported today. If you have a strong need, write to us.

Can I show several locations or a monthly table?

You can place the script tag more than once on a page, each with its own coordinates, and each renders its own card. For a monthly or yearly table, call the API for each date from your own code.

Get the Niyyara app

Niyyara is a free, private, ad-free worship companion for iOS and Android: prayer times and azan, the full Quran with translation and recitation, Qibla, duas, the 99 Names, the Hijri calendar and gentle reminders. Learn more about Niyyara.