Back to Blog

How to Embed Google Calendar: Complete Guide for Websites

6 min read
A computer screen with the google logo on it
Photo by OpenClassActions on Unsplash

Embedding a Google Calendar on your website lets visitors see your availability, upcoming events, or important dates without leaving your site. Whether you're a freelancer showcasing your availability, a small business displaying store hours, or an organization sharing event schedules, knowing how to embed Google Calendar properly can save your audience time and reduce back-and-forth communication.

The process involves generating an embed code from Google Calendar and customizing it to fit your website's design and functionality needs. This guide walks you through every step, from basic embedding to advanced customization options.

Getting Your Google Calendar Embed Code

Before you can embed your calendar anywhere, you need to generate the embed code from Google Calendar. This requires making your calendar publicly accessible and copying the provided HTML code.

First, open Google Calendar in your web browser and locate the calendar you want to embed in the left sidebar. Click the three dots next to the calendar name and select "Settings and sharing."

Scroll down to the "Access permissions" section and check the box next to "Make available to public." This step is crucial—private calendars cannot be embedded on websites. Google will warn you that anyone with the link can view your calendar, so only do this for calendars containing information you're comfortable sharing publicly.

Next, scroll down to the "Integrate calendar" section. You'll see an "Embed code" field containing HTML code that looks something like this: <iframe src="https://calendar.google.com/calendar/embed?src=..." width="800" height="600"></iframe>

Copy this entire code—you'll paste it into your website's HTML. The code creates an iframe that displays your calendar within your webpage.

Customizing Your Embedded Calendar Display

The default embed code works, but you'll likely want to customize how your calendar appears to match your website's design and your visitors' needs.

Google provides a customization tool right below the embed code. Click "Customize" to access options for:

  • **Title**: Show or hide the calendar title at the top
  • **Navigation buttons**: Allow visitors to navigate between months
  • **Date and time**: Display in different formats
  • **Calendar list**: Show multiple calendars if you have several public ones
  • **Week numbers**: Display week numbers for easier reference

The most important settings are the view options. You can set the default view to:

  • **Month**: Shows the full month grid (default)
  • **Week**: Displays one week at a time
  • **Agenda**: Lists upcoming events chronologically

For most business websites, the agenda view works best because it shows upcoming events clearly without taking up too much vertical space.

You can also adjust the width and height by modifying the numbers in the embed code. For responsive websites, consider setting the width to "100%" and adjusting the height based on how much content you expect to display.

Adding the Embed Code to Your Website

Once you've customized your embed code, adding it to your website depends on your platform.

For WordPress sites: Switch to the HTML or Code editor (not the Visual editor) and paste the embed code where you want the calendar to appear. Most modern WordPress themes handle iframe responsiveness automatically.

For website builders (Wix, Squarespace, etc.): Look for an "Embed Code," "HTML," or "Custom Code" widget. Paste your calendar code into this widget and position it on your page.

For custom HTML sites: Paste the embed code directly into your HTML file where you want the calendar to display.

After adding the code, preview your page to ensure the calendar displays correctly. If it appears too large or small, adjust the width and height values in the embed code.

Managing Multiple Calendar Embeds

If you manage multiple Google Workspace accounts—common for freelancers juggling several clients—embedding calendars becomes more complex. You might have separate calendars for different clients or projects, each requiring its own embed code.

For situations like this, a tool that syncs your calendars automatically can simplify your workflow by combining multiple Google Calendars into a unified view before embedding.

When embedding multiple calendars on the same page, consider these approaches:

  1. **Separate iframes**: Embed each calendar individually with clear labels
  2. **Tabbed interface**: Use CSS or JavaScript to create tabs that switch between calendars
  3. **Combined calendar**: Merge calendars into one public calendar specifically for embedding

For professional websites, the tabbed approach often provides the best user experience while keeping the page organized.

Privacy and Security Considerations

Embedding Google Calendar requires making your calendar public, which has important privacy implications. Only include events and information you're comfortable sharing with anyone who visits your website.

Consider creating a separate "Public Events" calendar specifically for embedding. This way, you can keep your personal calendar private while still sharing specific information publicly.

For events that need to be public but shouldn't show all details, create events with generic titles like "Client Meeting" instead of "Meeting with John Smith about Project X." You can always provide more specific details through other communication channels.

Remember that public calendars are indexed by search engines, so event titles and descriptions may appear in search results.

Troubleshooting Common Embedding Issues

Several common problems can prevent your embedded calendar from displaying correctly.

Calendar not appearing: This usually means the calendar isn't set to public. Return to your calendar settings and ensure "Make available to public" is checked.

Calendar showing as empty: Check that your calendar actually contains events and that they're not set to private. Also verify that you're looking at the correct date range—if all your events are in the future, the current month view might appear empty.

Responsive issues on mobile: The default embed code doesn't automatically resize for mobile devices. Add CSS to make your iframe responsive:

.calendar-container {
position: relative;
padding-bottom: 75%;
height: 0;
overflow: hidden;
}

.calendar-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

Wrap your embed code in a div with the "calendar-container" class to apply these styles.

Slow loading times: Large calendars with many events can slow down your webpage. Consider using the agenda view instead of month view, or limit the date range displayed.

Advanced Customization with CSS

While Google's customization options cover basic needs, you can further style your embedded calendar using CSS. Since the calendar loads in an iframe, direct styling is limited, but you can control the iframe container.

You can add borders, shadows, or background colors to the iframe itself:

iframe[src*="calendar.google.com"] {
border: 2px solid #4285f4;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

For more extensive customization, consider using the Google Calendar API instead of embedding, though this requires more technical knowledge.

Making Your Embedded Calendar More Effective

To maximize the value of your embedded calendar, consider these best practices:

Keep event titles clear and professional. Remember that website visitors might not have context about your business or industry terminology.

Use consistent event formatting. Develop a standard format for how you title events, include times, and add descriptions.

Regular maintenance: Keep your calendar updated with accurate information. Setting up automated reminders can help you maintain consistency.

Consider your audience's timezone: If you serve clients across multiple timezones, mention your timezone in event descriptions or include a note on your website about what timezone the calendar displays.

Embedding your Google Calendar transforms your website into a more interactive, informative resource for visitors. Whether you're displaying office hours, event schedules, or availability for appointments, a well-implemented calendar embed reduces friction and improves user experience. Take time to customize the display settings and test the calendar across different devices to ensure it serves your audience effectively.