devkult_
tools29converters34
home/mime/.ics

.ics MIME type

iCalendartext & code

text/calendar

Calendar events and feeds in iCalendar format (RFC 5545).

MIME typetext/calendar
Extensions.ics
Content-Typetext/calendar; charset=utf-8
Compress in transit?Yes — enable gzip or Brotli

Good to know

  • Serve calendar subscription feeds with this type so calendar apps recognise them; webcal:// links point at the same file.
  • iCalendar lines end with CRLF and long lines are folded at 75 octets.

Serve .ics files with the right type

The response header to send:

Content-Type: text/calendar; charset=utf-8

Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:

nginx (inside the types block in mime.types)
text/calendar ics;
Apache (.htaccess or server config)
AddType text/calendar .ics
Express
res.set("Content-Type", "text/calendar; charset=utf-8");
Python
import mimetypes

mimetypes.add_type("text/calendar", ".ics")
HTML file input
<input type="file" accept=".ics,text/calendar">

Check it

See what a server sends for a file, and what type a local file really is by its contents:

curl -sI https://example.com/file.ics | grep -i '^content-type:'
file --mime-type file.ics

Frequently asked questions

What is the MIME type for .ics files?

text/calendar.

What Content-Type header should a .ics file be served with?

Content-Type: text/calendar; charset=utf-8. As a text format, include the charset so browsers don't guess the encoding. It compresses well, so let the server apply gzip or Brotli.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options