ICS File Documentation


Summary

An iCalendar file is a calendar file in the internet-standard iCalendar format defined by RFC 5545. It holds events, invitations, tasks or reminders as plain UTF-8 text, and its MIME type is text/calendar. Double-click a .ics to add the event to your default calendar, or in Google Calendar use Settings → Import & export. Outlook, Apple Calendar and almost every calendar app open it natively. It is not a spreadsheet or a contacts file.

Technical details

FeatureValue
Full nameiCalendar data file
File extension.ics
MIME typetext/calendar
Format typePlain-text calendar data (line-based, UTF-8)
DeveloperIETF (RFC 5545); originally the Internet Mail Consortium
Introduced1998 (RFC 2445)
Current standardRFC 5545 (2009); extensions in RFC 7986
Version propertyVERSION:2.0
Open standardYes
EncodingUTF-8 text; optional BOM EF BB BF
Start markerBEGIN:VCALENDAR (text, not a binary magic number)
End markerEND:VCALENDAR
Line endingCRLF; long lines folded at 75 octets
ComponentsVEVENT, VTODO, VJOURNAL, VFREEBUSY, VTIMEZONE, VALARM
RecurrenceRRULE (repeating events)
Time zonesVTIMEZONE definitions; UTC times end in Z
Opens inOutlook, Apple Calendar, Google Calendar, Thunderbird, any text editor
Not the same asvCard (.vcf), which stores contacts, not events
Related extensions.ical, .ifb, .vcs, .vcf
Specification URLdatatracker.ietf.org/doc/html/rfc5545
Syntax at a glance

An ICS file is plain UTF-8 text with no binary signature. Every valid file starts with the line BEGIN:VCALENDAR and ends with END:VCALENDAR; a UTF-8 BOM (EF BB BF) may precede it. Content is a series of content lines, each a property name, optional semicolon-separated parameters, and a value after a colon (for example DTSTART;TZID=Europe/London:20260611T140000), ended by CRLF. Lines longer than 75 octets are folded by inserting CRLF plus one leading space. Components such as VEVENT and VALARM are wrapped in their own BEGIN:/END: pairs.

What is an ICS file?

ICS is the file form of iCalendar, the internet standard for exchanging calendar data. The IETF first defined it in RFC 2445 in 1998 and revised it as RFC 5545 in 2009, with later additions in RFC 7986. The format is plain UTF-8 text, so an .ics opens in any text editor, but its purpose is to be imported into a calendar program: a meeting invitation, a task, a reminder or a whole exported calendar, encoded in a way every major calendar app understands. Its MIME type is text/calendar.

Most people meet ICS as an email attachment. An invitation created in Outlook, Google Calendar, Zoom, Teams or Calendly arrives as invite.ics, and opening it adds the event with one click. Websites also publish subscribable ICS feeds (a URL ending in .ics) so a calendar stays in sync with holidays, class timetables or sports fixtures. The sections below describe how the text is actually structured: the VCALENDAR container, the component types, the exact content-line grammar, line folding, recurrence rules and time zones.

The VCALENDAR container and its components

Every ICS file is a single VCALENDAR object wrapped in a BEGIN:VCALENDAR / END:VCALENDAR pair. Immediately after BEGIN come two required properties: VERSION (always 2.0 for iCalendar) and PRODID, an identifier for the software that wrote the file. Inside the container sit one or more components, each with its own BEGIN/END pair.

ComponentWhat it represents
VEVENTAn event or appointment (the most common)
VTODOA task or to-do item, with due date and completion status
VJOURNALA dated journal or note entry
VFREEBUSYAvailability information (busy/free time blocks)
VTIMEZONEA time-zone definition used by the other components
VALARMA reminder, nested inside a VEVENT or VTODO

A single file can hold many components: several VEVENT blocks plus the VTIMEZONE they reference, which is exactly how a whole calendar is exported and moved between Apple Calendar, Outlook and Google Calendar. Because the container is self-delimiting text, a parser reads it line by line, opening and closing components as it meets each BEGIN/END.

The content-line grammar: name, parameters and value

The body of an ICS file is a sequence of content lines, and every property follows the same grammar: a property name, then optional parameters each introduced by a semicolon, then a colon, then the value, ended by CRLF.

name *(";" param ) ":" value CRLF

SUMMARY:Team meeting
DTSTART;TZID=Europe/London:20260611T140000
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:mailto:sam@example.com
DTSTART;VALUE=DATE:20260611

The parameters modify how the value is read. TZID names the time zone a local timestamp belongs to; VALUE=DATE says the value is a whole-day date with no time; RSVP=TRUE asks an attendee to reply. Date-time values use a compact basic ISO 8601 form, YYYYMMDDThhmmss; a trailing Z (as in 20260611T140000Z) marks the value as UTC. Certain characters inside text values must be escaped with a backslash: \n for a newline, \, for a comma, \; for a semicolon, so that they are not misread as line breaks or field separators.

Line folding: the 75-octet rule

RFC 5545 says a content line should not exceed 75 octets, not counting the line break. Longer lines are split using a technique called folding: the writer inserts a CRLF followed immediately by a single space (or tab), and a reader reverses it by unfolding, deleting any CRLF that is followed by a leading whitespace character and rejoining the pieces.

DESCRIPTION:This is a long description that exceeds seventy-five octe
 ts and has therefore been folded onto a second physical line with a l
 eading space.

Two details trip up hand-written parsers. First, the limit is in octets, not characters, so a folder must not split in the middle of a multi-byte UTF-8 sequence, which would corrupt the character. Second, the space that begins a continuation line is part of the folding mechanism and is removed on unfolding; it is not part of the value. This is why a naive tool that reads an ICS line by line, without unfolding first, sees truncated properties.

A complete VEVENT, property by property

Putting the grammar together, here is a minimal but valid single-event file. Every event needs a UID (a globally unique identifier, used to match updates and cancellations to the original) and a DTSTAMP (when this version of the object was created).

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp//Scheduler 1.0//EN
BEGIN:VEVENT
UID:19970901T130000Z-123401@example.com
DTSTAMP:20260601T120000Z
DTSTART;TZID=Europe/London:20260611T140000
DTEND;TZID=Europe/London:20260611T150000
SUMMARY:Team meeting
LOCATION:Room 2.4
RRULE:FREQ=WEEKLY;BYDAY=WE;COUNT=8
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER:-PT15M
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR

The DTSTART and DTEND give the start and end, tied to a time zone by TZID. The nested VALARM is a reminder: ACTION:DISPLAY pops up a notification, and TRIGGER:-PT15M fires it 15 minutes before the start (an ISO 8601 duration, negative meaning “before”). ORGANIZER and ATTENDEE properties (omitted here) turn a plain event into an invitation with RSVP tracking. This is why an ICS attachment carries so much more than a date: participants, reminders, location and status all travel with the event.

RRULE: encoding a repeating event in one line

Rather than write out every occurrence, iCalendar encodes repetition in a single RRULE property. It has a FREQ (DAILY, WEEKLY, MONTHLY or YEARLY) and optional parts that narrow it down: INTERVAL (every N periods), BYDAY (which weekdays), BYMONTHDAY, and an end condition of either COUNT (a number of occurrences) or UNTIL (a stop date).

RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;UNTIL=20261231T000000Z
RRULE:FREQ=MONTHLY;BYDAY=2TU               (the 2nd Tuesday each month)

The importing app expands the rule into concrete dates. Individual occurrences can then be modified or cancelled with EXDATE (an excluded date) or a second VEVENT sharing the same UID plus a RECURRENCE-ID. This compact encoding is what lets a small text file describe an event that repeats indefinitely.

VTIMEZONE and why events show the wrong time

Because calendar data crosses zones, iCalendar carries time-zone definitions inside the file. A VTIMEZONE component defines a named zone (its TZID) with sub-components for standard time and daylight saving, each giving the UTC offset and the rule for when the switch happens. Local timestamps then reference it by TZID, so the same event resolves to the correct wall-clock time anywhere it is opened.

The common “my event is off by an hour” problem is almost always a time-zone issue. A well-formed file either uses UTC values (a trailing Z) or includes the VTIMEZONE its timestamps reference. If a file gives a bare local time with no zone information, the importing app assumes your local zone, which shifts the event for anyone in a different one. That is a data problem in the file, not a bug in the reader.

Frequently asked questions

How do I import an ICS file into Google Calendar?

On a computer, open Google Calendar, click the gear then Settings, choose Import & export, select the .ics, pick the calendar to add it to, and click Import. The mobile app cannot import files directly, but it syncs the events afterward.

How do I open an ICS file in Outlook?

Double-click the file to add a single event, or use File → Open & Export → Import an iCalendar (.ics) file to import a whole calendar. Outlook can either merge the items into your calendar or open them as a separate calendar.

Why does my ICS show the wrong time?

Usually a time-zone problem. A well-formed file includes VTIMEZONE data or UTC times (a trailing Z). If the file gives a bare local time with no zone, the importing app assumes your local zone, which shifts the event for anyone elsewhere.

Is an ICS file the same as a vCard (VCF)?

No. ICS holds calendar events; VCF holds contacts. They look similar because both are line-based text, but they are separate standards and are not interchangeable. There is no sensible event-to-contact conversion.

References