Standards/ical-event-qr
iCal Event QR
Overview
iCal Event QR is a QR Code whose text is an iCalendar event: a VEVENT block opened by BEGIN:VEVENT and closed by END:VEVENT, usually without the VCALENDAR object around it. Scanning it offers to add the event (title, start, end, location) to the phone's calendar. ZXing's wiki gives the convention this example 1:
BEGIN:VEVENT
SUMMARY:Summer+Vacation!
DTSTART:20180601T070000Z
DTEND:20180831T070000Z
END:VEVENT
iCalendar is the IETF format defined by RFC 5545 (September 2009), which obsoletes RFC 2445 2. The QR convention is not in either RFC. It is documented by the ZXing project, whose wiki links to the RFC 5545 event component as the definition of a "vEvent" 1. Apple said in 2017 that iOS supports "event QR codes encoded with the iCalendar format" 13. A bare VEVENT without DTSTAMP and UID, as ZXing shows it, is not a conformant RFC 5545 object (see Technical specification) 2.
History
vCalendar. The versit consortium's "two main technologies" were vCard and vCalendar, "an electronic calendaring and scheduling exchange format"; "beginning in December, 1996, the Internet Mail Consortium took on responsibility for the development and promotion" of both 18. vCalendar files used the .vcs extension 117.
iCalendar. RFC 2445, by F. Dawson (Lotus) and D. Stenerson (Microsoft), was published in November 1998 and states that it "is based on the earlier work of the vCalendar specification" 3. The IMC listed RFC 2445, 2446 (iTIP) and 2447 (iMIP) as the three iCalendar RFCs and wrote that it "hopes that all vCalendar developers take advantage of these new open standards" 18. RFC 5545, edited by B. Desruisseaux (Oracle), obsoleted RFC 2445 in September 2009 2. One change matters for QR payloads: in RFC 2445 DTSTAMP and UID were optional event properties 3, while RFC 5545 makes both "REQUIRED" in every VEVENT 2. RFC 5545's list of differences from RFC 2445 does not mention this 2.
In QR codes. ZXing's changelog records "Added basic iCal format support" and "Added new calendar event parsed result type" in release 0.9 (11 July 2008), and "Better calendar event and MECARD support" in 1.1 (22 October 2008) 10. ZXing's VEventResultParser, by Sean Owen, describes itself as partly implementing "the iCalendar format's 'VEVENT' format ... See RFC 2445" 4. At Apple's 2017 Tech Talk on QR recognition in iOS 11, Apple listed iCalendar events among the QR types the system handles 13. No source read for this page names who first put a VEVENT in a QR code, or when.
Technical specification
What RFC 5545 defines 2:
| Rule | RFC 5545 text |
|---|---|
| Line break | Content lines "are delimited by a line break, which is a CRLF sequence" |
| Line length | "Lines of text SHOULD NOT be longer than 75 octets, excluding the line break"; longer lines are folded with CRLF followed by one space or tab, removed again when unfolding |
| Charset | "The default charset for an iCalendar stream is UTF-8" |
| Object | BEGIN:VCALENDAR ... END:VCALENDAR, with PRODID and VERSION required once each |
| Event | BEGIN:VEVENT CRLF, properties, optional VALARMs, END:VEVENT CRLF |
Required in VEVENT |
DTSTAMP and UID; DTSTART too when the object has no METHOD |
| Optional, at most once | SUMMARY, LOCATION, DESCRIPTION, GEO, URL, ORGANIZER, STATUS and others |
| End time | DTEND or DURATION, never both |
DTSTAMP must be in UTC; UID "MUST be a globally unique identifier" 2. RFC 5545's own example object carries both:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:19970610T172345Z-AF23B2@example.com
DTSTAMP:19970610T172345Z
DTSTART:19970714T170000Z
DTEND:19970715T040000Z
SUMMARY:Bastille Day Party
END:VEVENT
END:VCALENDAR
Times. A time is local ("floating") when written plainly, UTC with a trailing Z, or local with a TZID parameter; RFC 5545 gives 083000, 133000Z and TZID=America/New_York:083000 for 8:30 in New York in winter 2. DTEND is the "non-inclusive end of the event". An event whose DTSTART is a DATE (all-day) and has no DTEND or DURATION lasts one day; a DATE-TIME DTSTART without DTEND ends at the same moment it starts 2.
Text escaping. In TEXT values, \\ encodes a backslash, \; a semicolon, \, a comma, and \n or \N a newline. A line break inside a value "MUST only be included" as \n/\N, and a colon "SHALL NOT be escaped" 2.
What the QR convention changes. ZXing's example has no VCALENDAR, PRODID, VERSION, DTSTAMP or UID 1. ZXing's parser does not need them:
- It looks for
BEGIN:VEVENTanywhere in the text and requires aDTSTART; without one it returns no calendar result 4. - It reads
SUMMARY,DTSTART,DTEND,DURATION,LOCATION,ORGANIZER,ATTENDEE,DESCRIPTIONandGEO;UIDandDTSTAMPare ignored 4. - A property name is matched only at the start of the text or after a
\n, and a value ends at the next\n(a preceding\ris dropped). Lines ending in bare LF are therefore accepted, and ZXing's test suite includes LF-only events 57. - It unfolds only CRLF followed by a space or tab. An LF-folded line is kept as one value but its
\nand leading spaces stay in the text; ZXing's own test expects exactly that 57. - It undoes
\n,\N,\,,\;and\\5. - Dates must match
[0-9]{8}(T[0-9]{6}Z?)?: an 8-digit DATE is an all-day event, aZtime is UTC, otherwise the time is taken as local 6. WithoutDTEND, an RFC duration (P…W…DT…H…M…S) gives the end time 6. testNoVCalendarchecks that a bareVEVENTparses the same as one wrapped inVCALENDAR7.
ZXing's example writes the title as Summer+Vacation! 1. The parser does not turn + into a space, so that + is part of the title 5.
Size. The payload is plain text in byte mode. BWIPP's QR encoder accepts "any byte values"; readers interpret them as ISO/IEC 8859-1 unless an ECI says otherwise 15. That default is not RFC 5545's UTF-8 2, so whether a non-ASCII title survives depends on the encoder and the reader. No source read here measures that.
Use cases
- Add-to-calendar from print. Apple: "Tapping on this notification adds the event to your calendar and shows you the event details" 13. ZXing's Android Barcode Scanner opens the system "Add event" screen with the title, start, end, location and description filled in. If no calendar app handles that screen, it tries again with an edit action 8.
- Generators. ZXing's web generator includes a calendar-event form 9, and QRCoder (.NET) ships a
CalendarEventpayload 14. - Scanner SDKs. Google ML Kit returns "a calendar event extracted from QRCode" with summary, description, location, organizer, status, start and end 12.
No source read for this page gives deployment examples (venues, campaigns) or how common event QR codes are compared with URL codes that link to an .ics file.
Implementations
| Project | Role | Event-QR behaviour |
|---|---|---|
| zxing/zxing (Java) | Decoder + parser | VEventResultParser → CalendarParsedResult, as described above 456 |
| ZXing Android app | Scanner app | Opens the system calendar's insert screen (ACTION_INSERT, vnd.android.cursor.item/event). The organizer goes into the description because the intent has no field for it 8 |
| ZXing web generator | Encoder | Writes BEGIN:VEVENT, SUMMARY, DTSTART/DTEND (UTC Z times after a time-zone offset is applied, or VALUE=DATE with the end date plus one day because "it's exclusive"), optional LOCATION, DESCRIPTION, then END:VEVENT. Every line ends in CRLF, including the last. No DTSTAMP/UID; it rejects newlines in fields and does not escape commas or semicolons 9 |
| zxing-cpp (C++) | Decoder | Returns the text. Its content types are Text, Binary, Mixed, GS1, ISO15434 and UnknownECI, so no calendar parsing 11 |
| Google ML Kit | Decoder SDK | Barcode.CalendarEvent 12 |
| iOS Camera (since iOS 11) | Scanner | Supports "event QR codes encoded with the iCalendar format" 13. Apple does not say whether the VCALENDAR wrapper is required |
| QRCoder (C#) | Encoder | CalendarEvent: SUMMARY, optional DESCRIPTION/LOCATION, DTSTART, DTEND. Lines are joined with Environment.NewLine, which is CRLF on Windows and LF elsewhere. No escaping, no DTSTAMP/UID. iCalComplete adds VCALENDAR and VERSION:2.0 but no PRODID 14 |
| bwip-js / BWIPP | Renderer | No iCalendar logic: the payload is ordinary qrcode data. eclevel L, M (default), Q or H; version 1–40 or automatic 1516 |
This page's playground. Barcoder's ical-event-qr encoder builds a bare VEVENT and bwip-js renders it as a QR Code at level M. With the defaults the payload is:
BEGIN:VEVENT
SUMMARY:Team Standup
DTSTART:20260701T090000Z
DTEND:20260701T093000Z
END:VEVENT
That is 92 bytes. Lines are joined with LF, there is no trailing line break, and there is no DTSTAMP or UID. ZXing parses it: BEGIN:VEVENT is present, DTSTART is a valid UTC time, and LF line ends are accepted 456. Under RFC 5545 it is not conformant: the line breaks are not CRLF, DTSTAMP and UID are missing, and there is no VCALENDAR/PRODID/VERSION 2. It is the same shape as ZXing's own example 1. The encoder escapes \, ; and , as RFC 5545 requires but does not turn newlines into \n 2. It does not fold long lines, which suits ZXing, since ZXing would not unfold an LF fold 5.
Comparison
- Bare
VEVENTvs fullVCALENDAR. RFC 5545 requires the wrapper, withPRODIDandVERSION2. ZXing parses both forms the same way 7 and shows the bare one 1. QRCoder makes the wrapper optional 14. - Event QR vs a URL to an
.icsfile (URL QR). AVEVENTpayload works offline and needs no server. Its size grows with every property, and once printed it cannot be changed. A URL keeps the code small and the event editable, but it depends on the server. - Event QR vs vCard QR and MeCard. These are the same idea for contacts. vCard and iCalendar both descend from the versit/IMC formats 18. Apple lists vCard, MeCard and iCalendar side by side as supported QR types 13. ZXing parses
VEVENTfields with the same routine it uses for vCard 45. GEOvs geo URI. ZXing reads aGEO:lat;lonproperty inside the event and rejects the event if it is malformed 4. Ageo:URI encodes only a place.
Fun facts
- ZXing's parser comment says it "supports SUMMARY, LOCATION, GEO, DTSTART and DTEND fields", but the code below it also reads
DURATION,ORGANIZER,ATTENDEEandDESCRIPTION4. - The canonical ZXing example's title is
Summer+Vacation!, apparently form-encoded, and ZXing's own parser keeps the+15.
Status
Active, de facto. iCalendar's defining document is RFC 5545 2. The QR carrier has no specification beyond ZXing's wiki entry and its parser 14. Both are still in ZXing's main repository. Apple's iOS Camera, Google ML Kit, ZXing's Android app, and generators such as QRCoder handle event payloads 8121314. Conformance varies: common generators omit DTSTAMP and UID, and their line endings vary 914.
Sources
Deployments
No country reports mention this standard by name.
Regions / aggregations not mapped to a single country
- Universal