How to Add a Custom Font to a Shopify Theme

First pick a font from Shopify's font library in Theme settings, then Typography, which needs no code. If your font is not in the library, upload a WOFF2 file to Content, then Files, add an @font-face rule that uses the file_url filter, and point your theme's text at the new font family. Duplicate your theme first and keep the number of font files low.

By Charles · Published · Updated

Illustration of a storefront on a laptop with stylized letters being swapped, linked to a font file card

To add a custom font to a Shopify theme, first check whether the font is in Shopify's font library, because you can pick those in Theme settings without code. If it is not, upload a WOFF2 file to Content, then Files, add an @font-face rule in your theme layout that points to the file with the file_url filter, and then tell your theme's text styles to use the new font family.

Not sure which route fits your theme? Send a project brief and we will tell you before you pay.

Key facts

  • Theme settings, then Typography, lets you set the heading and body font, and every free Shopify theme uses fonts from Shopify's font library. Shopify Help Center, checked 10 November 2026.
  • For fonts outside the library, Shopify says to upload font files to Content, then Files, when you edit in the admin, and to use the file_url filter in an @font-face rule. Shopify.dev fonts, checked 10 November 2026.
  • Shopify recommends WOFF2, font-display: swap, and a small number of font files. Shopify.dev self-hosting guide, checked 10 November 2026.

How do you change fonts without code?

Use the Typography setting in the theme editor. Shopify says you can set the font style and size for your store's text, and that the fonts available depend on your theme's developer. All free Shopify themes use fonts from Shopify's font library. See Shopify's theme settings guide, checked 10 November 2026.

  1. In your Shopify admin, go to Online Store and click Edit theme on the theme you want to change.
  2. Click the Theme settings icon, then Typography.
  3. In the Headings or Body section, click Change, choose a font and click Select.
  4. Click Save.

Shopify also suggests considering system fonts. They are already installed on the visitor's computer, so the browser does not download a new font, which avoids a hit to loading speed. Which font shows depends on the visitor's operating system.

Check the library before you add code. Shopify says some fonts cannot be included in the library because of licensing restrictions, so a missing font does not mean you did something wrong.

How do you add a custom font file?

Back up first, then upload the file and add one @font-face rule. Shopify says it is a good idea to duplicate your theme before you customize, so you can discard your changes and start again (checked 10 November 2026). Do the steps below on the duplicate.

  1. Get a WOFF2 file. Check that your font's licence allows web use before you upload it. Shopify's self-hosting guide says to use WOFF2 as the primary format, with WOFF as a fallback for older browsers.
  2. Upload it. If you edit in the Shopify admin, go to Content, then Files, and upload the font there. Shopify says uploading some font types to the assets folder through the admin code editor might lead to file corruption.
  3. Add the rule. In your theme's layout file, layout/theme.liquid, add an @font-face rule inside a <style> tag. For a file in Files, the URL comes from the file_url filter, which Shopify says returns the CDN URL for a file from the Files page.
  4. Use the font. Set font-family on the text you want to change, with fallback fonts after it.

Here is the pattern from Shopify's documentation, using a placeholder font name and file name:

<style>
  @font-face {
    font-display: swap;
    font-family: "Brand Sans";
    font-style: normal;
    font-weight: 400;
    src: url("{{ 'brand-sans-regular.woff2' | file_url }}") format("woff2");
  }

  body {
    font-family: "Brand Sans", system-ui, -apple-system, sans-serif;
  }
</style>

Shopify's self-hosting guide says to define the rules inline in the layout file above {{ content_for_header }}, so the browser discovers them as early as possible. Use a separate @font-face rule for each weight and style you load, such as bold.

Your theme may not take its text font from a plain body rule. Dawn, for example, sets its body text from a --font-body-family variable and its headings from --font-heading-family (Dawn 16.1.1 source, checked 10 November 2026). Look at how your theme sets its font before you choose which rule to override.

Where should the font file live?

It depends on how you edit the theme. Shopify's documentation separates the two cases.

How you edit the theme Where the file goes Filter in the rule
Shopify admin code editor Content, then Files file_url
Shopify CLI, theme ZIP, GitHub integration The theme's assets folder asset_url

The filter matters because it only runs inside Liquid. Shopify says a stylesheet kept in your assets folder needs the .css.liquid extension for Shopify to process Liquid code inside it. Keeping the rule inline in theme.liquid avoids that.

One more difference: Shopify says theme downloads do not include files in Content, then Files. A font stored there stays with the store rather than the theme, so check it is still referenced if you move the theme to another store.

If you are on a trial plan, check the file format first. Shopify lists the formats a trial plan can upload, and WOFF2 is not on that list. On a paid plan, Shopify says you can upload any format except HTML, up to 20 MB for a generic file (file upload requirements, checked 10 November 2026).

What about Google Fonts or Adobe Fonts?

Shopify says you can use fonts from third-party services such as Typekit, either through the provider's hosting or by uploading the files to your theme. Its guidance is that self-hosting is the fastest approach because it removes external connections, and that Typekit fonts cannot be self-hosted. If you cannot self-host, it suggests adding preconnect hints and loading only the weights you use. See the self-hosting guide, checked 10 November 2026.

How many fonts are too many?

Keep it small. Shopify's guidance is one to two font families and two to four weights per family, and it says more than six font files total affects performance. Every family and weight is a separate download.

After you add a font, check the page again with our Shopify speed guide. Also look at the page on a phone, because a late font swap can move text around as it loads.

Will the font survive a theme update?

The uploaded file will, but the code may need a check. A font in Content, then Files, belongs to the store. The @font-face rule you added to layout/theme.liquid is a code edit, and code edits are what our theme update guide tells you to save and check before you publish an updated theme. Keep a copy of the rule so you can restore it.

Can Ecommerce Nerds add the font for you?

Adding a font through a Liquid or CSS change is the kind of bounded job our Quick Fix package covers: one bug or small change on your live store, with a Liquid or CSS fix as an example, for a fixed $299 USD. It is an example, not a promise that every font request fits one job; a font tied to several templates or a new section may need a different package.

Tell us your store URL, the font files, and which text should change in a brief, and we will confirm the fit and send a fixed quote within one business day before you pay. See our Shopify fixes service first if you want the detail.

Frequently asked questions

Can I use any font on my Shopify store?

Not without extra steps. Shopify's font library covers many fonts, and every free Shopify theme uses it. For a font that is not in the library, Shopify says you can use a third-party service such as Typekit or upload your own font files.

Where do I upload a custom font file in Shopify?

If you edit your theme in the Shopify admin, Shopify says to upload the font to Content, then Files, because uploading some font types to the theme's assets folder through the admin code editor might lead to file corruption. If you work locally with Shopify CLI, a theme ZIP or GitHub, put it in the theme's assets folder instead.

Which font file format should I use?

Shopify's self-hosting guide says to use WOFF2 as the primary format, with WOFF as a fallback for older browsers, and to skip EOT, TTF and SVG because modern browsers do not need them.

Will a custom font slow down my store?

It can. Shopify says fonts are a separate resource the browser downloads before text renders. Its guidance is to use font-display: swap and to limit fonts: one to two families and two to four weights per family is reasonable, and more than six font files affects performance.

Can Ecommerce Nerds add a custom font for me?

A small Liquid or CSS change is the kind of work in our Quick Fix package, which is $299 USD. Send a brief with the font files and where they should appear, and we will confirm the fit and quote a fixed price before you pay.

Need a custom font on your store? Send a project brief with the font files and the pages it should appear on.