QRAnalytica

How Do I Make a QR Code That Adds an Event to a Calendar?

A calendar event QR code holds the event as text or links to an add-to-calendar page. Here's how to build both, set the time zone and test it.

Nookesh Karri · 8 min read
Dark cover card with the title 'How Do I Make a QR Code That Adds an Event to a Calendar?' in white and a lime accent bar

To make a QR code that adds an event to a calendar, you have two options. You can encode the event itself as a short block of iCalendar text, so the phone offers to save it, or you can encode a link to an add-to-calendar page. The text version works offline but can’t be changed after printing, while a link works on every phone with a browser and can be edited later.

A calendar event QR code is not a special barcode. It is an ordinary QR code that holds either event text or a web address, and the phone decides what to do with it.

What a calendar event QR code actually contains

A calendar event QR code usually stores a vEvent: a few lines of plain text in the iCalendar format that describe one event. The barcode contents reference explains that iCalendar (.ics) and the older vCalendar (.vcs) both define a sub-set for events, and shows this example:

BEGIN:VEVENT
SUMMARY:Summer+Vacation!
DTSTART:20180601T070000Z
DTEND:20180831T070000Z
END:VEVENT

SUMMARY is the title, DTSTART is the start and DTEND is the end. Most generators add LOCATION and DESCRIPTION lines from the form you fill in.

There’s a catch the generator pages skip. An IETF draft on event links points out that QR readers that support calendar events use their own non-standard handling, usually a single VEVENT, and lean on the phone’s operating system to add it. No formal standard exists, so support depends on the scanner app.

How to make a calendar event QR code with the event text

Building the event-text version takes five steps, and the time zone step is the one people get wrong.

  1. Write the event details. You need a title, a start, an end and a location. Keep the description short, because every character makes the code denser.
  2. Choose the time format. See the time zone section below before you type any times.
  3. Generate the code. Pick the “event” or “calendar” type in a QR generator, or paste a VEVENT block into a generator that accepts plain text.
  4. Download it as SVG or PNG at a size that suits where it will be printed.
  5. Test it on an iPhone and an Android phone, with both the built-in camera and a scanner app. Open the event and check the title, date, time and location.

If the phone shows the raw text instead of an “Add to calendar” prompt, the scanner doesn’t handle vEvents. Your guests will see the same raw text. Switch to the link method.

Getting the time zone right

The time zone decides whether your guests turn up at the right hour. The iCalendar date-time rules allow three forms:

FormExampleWhat the phone does
Floating local time19980118T230000Shows that clock time in whatever zone the phone is in
UTC19980119T070000ZConverts from UTC to the phone’s zone
Named time zoneTZID=America/New_York before the timeConverts from that zone to the phone’s zone

For an in-person event, a floating time often looks right because guests are local. It breaks for anyone who saves the event while travelling, and for online events. UTC with a Z is the safest choice in a QR code, as long as you convert correctly. A 7 pm event in New York is not 7 pm UTC.

Two more rules from the event component spec catch people:

  • The end is not inclusive. An all-day event from June 28 to July 8 ends on July 9 in the file.
  • Use DTEND or DURATION, never both. If you leave the end out of a timed event, it ends at the same moment it starts.

The same spec marks UID and DTSTAMP as required in a full calendar file. Short QR payloads often leave them out to save space, which is one more reason support varies between apps.

A Google Calendar add-event link is a web address that opens a pre-filled “new event” screen in Google Calendar. The Google Calendar link reference lists the parameters:

  • Base address: https://calendar.google.com/calendar/render
  • action=TEMPLATE (required)
  • text for the title (required)
  • dates as start and end separated by a slash, such as 20201231T193000Z/20201231T223000Z
  • details and location (optional)
  • ctz for a named time zone, such as America/New_York

The reference warns that dates needs both a start and an end. It treats the pair as UTC only when both halves end in Z. An all-day event uses dates with no times, and the end date is the next day.

Build the link, URL-encode the spaces, open it on your own phone, then turn it into a QR code. Scanners open plain links in the browser, as the barcode contents reference says, so this works on any phone. The downside is that it only adds to Google Calendar. Apple Calendar and Outlook users need an .ics file instead.

The choice comes down to whether the details might change and who your guests are.

SituationBetter option
Fixed date, small printed card, guests may be offlineEvent text in the code
Date or venue might moveDynamic link
Guests use a mix of Google, Apple and OutlookLink to a page with a Google button and an .ics download
You want to know how many people scannedDynamic link

My take: for anything printed in bulk, like a flyer or an invitation, I’d use a dynamic link to a small event page with both buttons. Event text locks the date into the ink, and dates move. A dynamic QR code lets you change the destination after printing, which is the whole point when a venue cancels on you.

With QRAnalytica, a dynamic code redirects to whatever address you set, and you can change it later without reprinting. You also get scan counts by city, device and hour for event analytics.

The cost: a dynamic code runs through a redirect server, so it needs an internet connection at scan time and stops working if that service goes down. Event text in a static code needs neither.

Common mistakes with calendar QR codes

Most failed calendar codes come from one of these problems:

  • Wrong hour. The time was typed as UTC with a Z but meant local time. Check the saved event on a phone set to your zone.
  • Missing last day. An all-day festival ends a day early because the end date wasn’t moved one day later.
  • Too much text. A long description makes the code dense and hard to scan from a poster. Put details on a page and keep the code short.
  • Untested scanner. The code worked in one app and showed raw text in another.
  • Tiny print. Follow normal printing rules for QR codes, and leave a clear margin around the code.

If the event also needs a sign-in at the door, that’s a separate code. See the guide to QR code event check-in.

FAQ

Does an iPhone add a calendar QR code event automatically?

No phone adds it without asking. The Camera app recognizes the code and shows a prompt, and the person taps it to open the event. Whether the event text is understood depends on the scanner, so test on an iPhone before printing.

Can I change the date after the QR code is printed?

Not if the event is stored in the code itself. If the code is a dynamic link to an add-to-calendar page, you can update the page or the link target and the printed code still works.

Why does my event show up at the wrong time?

Usually the time zone. A time ending in Z is read as UTC, and a time with no zone floats to whatever zone the phone is in. Give the event a named time zone or convert it to UTC carefully.

How do I make an all-day event in a calendar QR code?

Use dates with no times. The end date is the day after the event ends, because the end is not inclusive.

Can one QR code add an event to Google Calendar and Apple Calendar?

A code holding event text can work with both, depending on the scanner. A Google Calendar link opens Google Calendar. For both, link to a page that offers a Google button and an .ics download.

Sources

Track your dynamic campaigns. 7-day trial, no credit card.
Generate Dynamic QR