Take the 2-minute tour ×

What are people using as the length of a MIMEType field in their databases? The longest one we've seen so far is 72 bytes:


but I'm just waiting for a longer one. We're using 250 now, but has anyone seen a longer MIMEType than that?

Edit: From the accepted answer, 127 for type and sub-type each, so that's 254 max, plus the '/' is a limit of 255 for the combined value.

share|improve this question

1 Answer 1

up vote 67 down vote accepted

According to RFC 4288 "Media Type Specifications and Registration Procedures", type (eg. "application") and subtype (eg "vnd...") both can be max 127 characters. you do the math :)

Edit: meanwhile, that document has been obsoleted by RFC 6838, which does not alter the maximum size but adds a remark:

Also note that while this syntax allows names of up to 127 characters, implementation limits may make such long names problematic. For this reason, <type-name> and <subtype-name> SHOULD
be limited to 64 characters.

share|improve this answer
Damn, I'd searched for that and never could find a good reference. –  Walden Leverich Mar 13 '09 at 20:04
For those who are not good at maths, that makes 127+1+127 = 255 if you include the slash. –  Álvaro G. Vicario Feb 10 '12 at 10:34

Your Answer


