fonts web-design performance typography svg ico file-extensions

Web and Font File Extensions Guide: WOFF2, TTF, OTF, and ICO

Why are there so many font and web icon formats? Learn the differences between .woff2, .woff, .ttf, .otf, .svg, and .ico, and which ones are best for modern websites.

2026-04-11

Web and Font File Extensions Guide: WOFF2, TTF, OTF, and ICO

When building a website or designing a digital product, choosing the right file format for your typography and icons is crucial for both visual quality and loading speed. Using an outdated font format can lead to "invisible" text while the font loads, or significantly slow down your site's performance.

This guide breaks down the essential font and web graphic extensions you need to know.


Quick Reference Table: Font and Web Formats

Extension Full Name Compression Primary Use
.woff2 Web Open Font Format 2.0 Very High Modern Web (Best performance)
.woff Web Open Font Format 1.0 High Web (Legacy browser support)
.ttf TrueType Font Low Windows/macOS Desktop, Basic Web
.otf OpenType Font Low Graphic Design, Advanced Typography
.svg Scalable Vector Graphics Varies Web Icons, Logos, Vector Art
.ico Icon None Favicons (Browser tab icons)

1. The Modern Web Standard (.woff2)

WOFF2 is the gold standard for web typography today. It uses an advanced compression algorithm (Brotli) to make font files up to 30% smaller than the original WOFF.

  • Pros: Fastest loading times, supported by all modern browsers.
  • Why use it? If you only care about modern browsers (Chrome, Firefox, Safari, Edge), .woff2 is the only format you need to include in your CSS @font-face.

2. Legacy Support (.woff)

The predecessor to WOFF2. While still widely supported, it isn't as efficient.

  • Why use it? Use it as a fallback if you need to support slightly older browsers that don't yet understand WOFF2.

3. Desktop and Design Standards (.ttf, .otf)

These are the formats you install on your computer to use in Word, Photoshop, or Figma.

  • TTF (TrueType): Developed by Apple and Microsoft in the 1980s. It's the most common format for general use.
  • OTF (OpenType): Built on TTF but supports advanced "OpenType features" like ligatures, small caps, and alternate glyphs. Designers prefer OTF for high-end print and digital work.
  • Web usage: While you can use these on the web, they are uncompressed and heavy. It's better to convert them to WOFF2 first.

4. Scalable Graphics (.svg)

Unlike fonts, which are collections of characters, SVG is a vector image format.

  • Logos and Icons: SVGs are perfect for logos because they never get blurry, no matter how much you zoom in.
  • In CSS: You can use SVGs as background images or even "SVG Fonts" (though the latter is now mostly deprecated in favor of WOFF2).

5. The Favicon (.ico)

The .ico format is a specialized container that can hold multiple versions of an icon at different sizes (16x16, 32x32, 48x48) in a single file.

  • Primary Use: The "favicon" you see in browser tabs.
  • Modern alternative: Most modern browsers now support PNG or SVG for favicons, but .ico remains the most compatible fallback.

Best Practices for Web Typography

  1. Prioritize WOFF2: Always list .woff2 first in your CSS to ensure modern browsers get the smallest file.
  2. Subset Your Fonts: Many font files contain characters for hundreds of languages you don't use. "Subsetting" a font removes unused characters, shrinking the file size even further.
  3. Use font-display: swap: This ensures that text is visible using a system font immediately, switching to the custom font once it has finished loading.

Common Questions (FAQ)

Q: Can I convert .ttf to .woff2 online?

A: Yes! There are many free tools that will take your desktop .ttf or .otf files and compress them into web-ready .woff2 files.

Q: Does WOFF2 support all the features of OTF?

A: Yes. WOFF2 is essentially an OTF or TTF file wrapped in a very efficient compression layer. It preserves all the typographic features (like ligatures) of the original file.

Q: Should I use SVG for my website's icons?

A: Generally, yes. SVGs are crisp, support transparency, and can be styled with CSS. For complex icon sets, some developers prefer "Icon Fonts" (using a .woff2 file), but inline SVG is considered the modern best practice.


Related Tools on Tool3M