🗓️⚙️
Free Hijri Date API
Convert between Hijri and Gregorian with the official Umm al-Qura calendar — simple JSON, no key, open CORS.
⚡ Try it now
📡 Endpoints
| Request | Description |
|---|---|
GET /api/date |
Today's date (Hijri + Gregorian), Riyadh time |
GET /api/date?date=2026-06-11 |
Gregorian → Hijri conversion |
GET /api/date?date=1447-12-26&calendar=hijri |
Hijri → Gregorian conversion |
Parameters
date— YYYY-MM-DD format (optional; defaults to today)calendar— "gregorian" (default) or "hijri" — the calendar of the input date
💻 Code Examples
JavaScript (fetch)
fetch('https://hijri-calendars.com/api/date')
.then(r => r.json())
.then(d => console.log(d.hijri.formatted)); // "26 Dhul-Hijjah 1447 AH"
cURL
curl "https://hijri-calendars.com/api/date?date=1447-12-26&calendar=hijri"
PHP
$d = json_decode(file_get_contents('https://hijri-calendars.com/api/date?date=2026-06-11'), true);
echo $d['hijri']['formatted_ar']; // "٢٦ ذو الحجة ١٤٤٧ هـ"
🤝 Fair Use & Attribution
Free for personal and commercial use. Please credit with a link to hijri-calendars.com in public-facing apps, and cache results on your side rather than re-requesting the same date.
❓ FAQ
Is it free?
Yes — no key, no signup. Just credit us with a link.
Which calendar is used?
The official Umm al-Qura calendar (islamic-umalqura) via ICU.
Supported ranges?
Gregorian 1900–2200, Hijri 1300–1600 AH.