Internet Explorer - support for Font Data URLs in @font-face CSS declarations?

Richard Fink's picture

Does anybody know what's up with using Data URLS for embedded fonts in Internet Explorer?
(Si, I'm lookin' at you, kiddo.)

I've noticed that Data URLS are supported in IE 11 - or so my webfont test pages tell me.

(If you're unfamiliar with them, data urls in a @font-face CSS declaration use base 64 encoding and look like this:

But oddly, I've heard nothing about it via the grapevine. No blog posts mentioning it, no twitterin', nothin'.

Did support start prior to IE 11 or is IE 11 the first version to do so? Are there any limitations like the size of the data? Is the format an issue - will TTF, OTF, WOFF and EOT all work?

Are there any support docs explaining it? (If so, they seem to be buried deep - I don't see Data URLS for fonts mentioned at all in the usual places on the Microsoft Developer Network where you'd expect to find it.)

Any help appreciated.


sergeym's picture

Hi Rich,

Data uri for fonts is supported since IE9 when we introduced full support for @font-face rules. Some webfont providers serve fonts this way for a long time.
There is nothing special about data uri in regards to fonts. They are just data blobs and processed as regular externally downloaded file, it doesn't matter what format is actually inside it. There was a limitation of 32k on data uri size in IE8, but in IE9 it was removed.
Is this information helpful?

Richard Fink's picture

>Is this information helpful?

Hey Sergey...

Yes, it's very helpful. Thanks.

To the extent that I can, I like to write web font test pages that have everything necessary written into the page with no need for supporting CSS or JS files.
So embedding a font using a Data URI is indeed useful.
It's been available since IE9? Wow - I'll bet a lot of developers have absolutely no idea that's the case and are feeding all versions of IE either an EOT, a WOFF, or a TTF file thinking they absolutely must do so.

Thanks again.


Syndicate content Syndicate content