Add custom fonts to your Shopify theme [Complete Guide]

Most Shopify themes, by default, come with a variety of Google Fonts built-in. Depending on your theme, you can easily find and change them on the Customize page of your theme and play around with a few different styles and combinations.

However, one thing that is not quite straightforward in Shopify is: how exactly can you add your own custom fonts? Say you have downloaded a new font and you have now a few .ttf, .woff, .woff2, and/or some other file extensions. How would you go about adding them to your theme and, equally important, making them the default instead of whichever font was previously being used?

In this tutorial, I’ll be teaching you how to achieve that. Also, don’t worry – no coding knowledge is required, but for more thorough customizations of how to style each specific HTML element with your font of choice, you may need some familiarity with HTML/CSS.

Making a backup copy of your theme

Before diving into the tutorial make sure you download the theme, so in case you face any issues you can easily revert back.

Step 1: Adding the font files to your store

The first thing that we have to do is to add the fonts to the Shopify store. From there, we can reference it via code and use it in our theme.

  1. From your Shopify admin, navigate to Settings > Files.

  2. Click on upload files at the top right and upload all of your font files. Web Font files are the ones that have the following extensions: .ttf, .woff,.woff2, .eot, .svg or .otf.

    Therefore, make sure you upload all font files that came with the .zip, or at least the ones you want to use.

    In this case, I have one single font file with the .otf format, so I’ll be uploading only this one.

  3. Once you have uploaded all of your font files, it’s time to add some code to read them.

    Leave this tab open, though – we’ll be returning to it soon.

Step 2: Adding the code to read the font

  1. In your Shopify admin, navigate to Online Store > Themes Actions Edit Code.

  2. Under sections, click on “Add a new section” and create a section named:


    Creating the ezfy-custom-fonts section in the Shopify code editor
  3. Paste the following code and save:

  4. Now, open the file named theme.liquid. Make sure it reads exactly “theme.liquid”.

  5. Search for:

  6. Paste the following code right below the line you found:

    {% section 'ezfy-custom-fonts' %}

Step 3: Using the custom font on your website

  1. On the top left, click on the 3 dots and “customize theme”.

  2. On the sidebar located on the left side, you will find a new section called “EZFY Custom Font”.

    Click on the arrow on the left to expand it, and then click on “Add font”.

  3. Under “Custom font name”, make sure you add a descriptive name. It can be anything you wish.

    My font’s name is “Cloud”, so I’ll be adding that.

    Now, under “Custom font URL”, add the URL for the file that was added back in step 2. Simply click on the chain icon to get the font’s URL.

On the screenshot above you can see that the font is immediately loaded right on the Customize page.

You can select which HTML elements should display your custom font, as well as add as many fonts you’d like.

Bear in mind that whatever font is first in the list will always overwrite the ones below it. Therefore, if you have added 5 fonts and assigned the “H1” for all 5 of them, the “H1” will use only the very first font in the list.

Extra: adding the custom font only to specific elements

If you’d like to use your custom font only for specific elements, you can use the “CSS Selectors” and add your selector there. Continue reading below to learn how to find your website’s CSS selector.

  1. While in the page containing the element whose font you wish to change, press CRTL + shift + c to open your browser’s developer tools in inspection mode. If you’re using a Mac, that’s CMD + shift + c instead.
  2. Find the text you want to change the font of and click it. This will highlight the element in the HTML.

    Selecting an element in the Impulse theme product page
  3. Next, right click the element in the HTLM, go to “Copy” and click “Copy selector”. This will copy a CSS selector meant to target this exact element.

    Copying an element's selector from Chrome's developer's tool
  4. Now that you have your CSS selector, simply copy and paste it at the very bottom at “CSS Selectors”:

  5. Note that this is a hard coded solution meant to select a single element, meaning that changes to your store’s HTML (specially to areas near where the font was changed) are likely to cause it to stop working.

    If that happens, you can re-do this section of the tutorial or use a broader CSS selector. You can do it as many times as you want for any number of elements.


Custom fonts are great, but use them wisely: too many fonts will end up overloading your website and taking a toll on its performance.

Remember that you can also fully disable the EZFY custom font at any time you wish by simply clicking on “EZFY Custom Font” > uncheck “Enable”.

You may also be interested in some other tutorials:

– How to make slideshow images stop cutting off
– Disable right click, image and text copying and improve your store’s security


You may also like

Here are some other blog posts you may be interested in.

Background with geometric patterns.Background with geometric patterns.Background with geometric patterns.Background with geometric patterns.Background with geometric patterns.Background with geometric patterns.

Do you need something different?

If the tutorial above is not what you're looking for, please let us know what you need. We'll get back to you within 24 hours.

Request a free quote

Contact Us

Let us know what type of customizations you're looking for.

Send us an e-mail and we'll get back to you within 24 hours! Before you click on "send message" please make sure to do the ReCaptcha so your e-mail can be sent safely.