Arabic Toolbox

Hijri Calendar API & Widget

Free Umm al-Qura data for your apps and a ready-made widget for your website. No key, no sign-up.

Embed “Hijri date today”

Choose the options, then paste the code into any web page. The widget shows today's date for the chosen country and updates by itself.

Preview

Embed code

<iframe src="https://arabictoolbox.com/embed/hijri-date?lang=en&region=SA&theme=auto" title="Hijri date today" width="320" height="120" style="border:0" loading="lazy"></iframe>

JSON API

One static JSON file per Hijri year from 1356 to 1499 AH, served from a CDN with CORS enabled. Each file lists the 12 months with their Gregorian start and end dates and the main Islamic occasions for Saudi Arabia, each with its status.

Example response

{
  "hijri_year": 1448,
  "start": "2026-06-16",
  "end": "2027-06-05",
  "days": 355,
  "months": [
    { "month": 1, "name": "Muharram", "name_ar": "محرم",
      "start": "2026-06-16", "end": "2026-07-14", "days": 29 },
    …
  ],
  "occasions": [
    { "slug": "ramadan", "name": "Ramadan begins", "name_ar": "بداية رمضان",
      "hijri": "1448-09-01", "gregorian": "2027-02-08", "status": "estimated" },
    …
  ]
}

Status values

Converting dates

Month boundaries are all you need to convert any date in either direction:

// Convert a Gregorian date to Hijri with one yearly file
async function toHijri(isoDate, hijriYear) {
  const res = await fetch(`https://arabictoolbox.com/api/v1/calendar/${hijriYear}.json`);
  const { months } = await res.json();
  const m = months.find((m) => m.start <= isoDate && isoDate <= m.end);
  if (!m) return null; // date is in a neighbouring Hijri year
  const day = (Date.parse(isoDate) - Date.parse(m.start)) / 86400000 + 1;
  return { year: hijriYear, month: m.month, day };
}

Accuracy and terms

Dates use the Umm al-Qura calendar, Saudi Arabia's official civil calendar. Other countries announce months by moon sighting and can differ by a day. The data is free to use; please credit and link to arabictoolbox.com.