I have a handful of events that I want to enter into Calendar. Since I have a lot of events, I'd like to copy/paste into a file and import the file, rather than enter them manually. Does anyone know the format for a given event?

I found this in an .ics file:

SUMMARY:Girls U14 Div 1A- Newton G Panthers VS Arlington GU14 A Team 
DESCRIPTION;ENCODING=QUOTED-PRINTABLE: There is a game at Valeo Main - Valeo Main
LOCATION:Valeo Main - Valeo Main

Looks fairly straightforward, although I don't know what to use for a UID.

Thanks, Bruce

  • You "have a handful of events" in what format or application currently? Mar 24, 2014 at 1:02
  • 1
    The "events" aren't in any particular format. I get an email with times and dates (sometimes multiple dates) and locations for different events, and it would be convenient to include the essential info in a .ics file (if I knew the format) and import that into Calendar. Thanks for your interest.
    – Bruce
    Mar 24, 2014 at 21:53
  • Do you want to send an .ics file to other people? If so, you can just export an event or even calendar. If you would like to enter things people send you into your calender, the mac's "data detector" feature sometimes allows you to enter an event and aitomatically gets the data from the mail (if you hover your mouse over a date in an email, there should be a small triangle you can click). Or check out the app fantastical - maybe that is what you're looking for Mar 24, 2014 at 22:03
  • 1
    no, I don't want to send an .ics file. I want to write my own .ics file and import it into my Calendar. Thanks.
    – Bruce
    Mar 25, 2014 at 1:28
  • 1
    I was going to create an .ics by hand. Sometimes I get a lot of events in an email, and I thought it would be easier to paste the events into .emacs, do some "quick" editing, and then import the .ics file. I may still try this, but (as you suggest) it might be simpler to simply create events in ical (or to use Fantastical, as someone else suggested). Thanks.
    – Bruce
    Mar 26, 2014 at 20:36

2 Answers 2


The iCalendar specification outlines what is required in an .ics file. In short, a simple .ics file looks like this:

PRODID:-//hacksw/handcal//NONSGML v1.0//EN
UID:[email protected]
SUMMARY:Bastille Day Party

The UID is a unique identifier. It's mostly used for sequencing multiple iCalendar requests. The iCalendar specification gives guidance for how to create it:

A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which the identifier was created on the right-hand side of an "@", and on the left-hand side, put a combination of the current calendar date and time of day (i.e., formatted in as a DATE-TIME value) along with some other currently unique (perhaps sequential) identifier available on the system (for example, a process id number). Using a DATE-TIME value on the left-hand side and a domain name or domain literal on the right-hand side makes it possible to guarantee uniqueness since no two hosts should be using the same domain name or IP address at the same time. Though other algorithms will work, it is RECOMMENDED that the right-hand side contain some domain identifier (either of the host itself or otherwise) such that the generator of the message identifier can guarantee the uniqueness of the left-hand side within the scope of that domain.

Most calendar applications are pretty forgiving of malformed .ics files. If your events are pretty simple (no recurrence, no invitations, etc), it's probably not too difficult to knock together an AppleScript (or whatever scripting language you prefer) to create these for you. Here's one AppleScript for it from StackOverflow.


A few years ago I wrote a quick explanation of how to build an ics calendar generator using MySQL and PHP. You might find that useful.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .