Skip to main content

Hebrew Date Converter REST API

We offer a simple API for converting between Gregorian and Hebrew dates. Two output formats are supported: JSON and XML.

Gregorian to Hebrew – single

To convert from Gregorian to Hebrew date use this URL format:
  • cfg=json – output format is JSON (cfg=json) or XML (cfg=xml)
  • g2h=1 – Convert from Gregorian to Hebrew date
  • gy=2011 – Gregorian year
  • gm=6 – Gregorian month (1=January, 12=December)
  • gd=2 – Gregorian day of month
  • gs=on – After sunset on Gregorian date

Gregorian to Hebrew – range of dates

To convert a batch of Gregorian dates to Hebrew dates, use this URL format:
  • cfg=json – output format is JSON (cfg=json)
  • g2h=1 – Convert from Gregorian to Hebrew date
  • start=2021-12-29 – Gregorian start date in YYYY-MM-DD format
  • end=2022-01-04 – Gregorian end date in YYYY-MM-DD format

Results will be truncated to 180 days if the end date is more than 180 days after the start date.

Hebrew to Gregorian – single date

To convert from Hebrew to Gregorian use this URL format:
  • cfg=json – output format is JSON (cfg=json) or XML (cfg=xml)
  • h2g=1 – Convert from Hebrew to Gregorian date
  • hd=25 – Hebrew day of month
  • hy=5749 – Hebrew year
  • hm=Kislev – Hebrew month

Month names may be specified in Hebrew or transliterated as follows:

Month nameHebrewCommon aliases
Adar1אדר א׳Adar 1Adar I
Adar2אדר ב׳Adar 2, Adar II

In leap years, specifying Adar is the same as specifying Adar2. In non-leap years, all three of Adar, Adar1, and Adar2 are considered equivalent and will be interpreted as Adar.

The API is somewhat lenient in what it accepts for Hebrew month names. You can specify sh%27vat or Sh%27vat or Shvat. It will always consistently generate Sh'vat in the response. Generally the API will accept month names with as few as 2 characters, as this is sufficient to disambiguate them from each other,.

Similarly, the API accepts all of Adar1Adar 1Adar IAdar2Adar 2Adar II. Because the capital-i and the lowercase-L look the same in some fonts, we recommend using the numerals 1 and 2 in the API usage. In the generated responses, Hebcal always uses Adar I and Adar II for consistency and compatibility as we’ve done for over 20 years.

Note also an optional callback parameter:

  • callback=function – wraps the JSON output text in parentheses and a function name of your choosing. Callback function names may only use upper and lowercase alphabetic characters (A-Z, a-z), numbers (0-9), the period (.), the underscore (_).

Sample output in JSON and XML