What you’ll need

  • Your font files (TTF, OTF, WOFF or WOFF2, one file per weight and style, with a license that allows web use)

  • Somewhere to upload the converted files

    How to get this: Somewhere to upload the converted files

    In your Shopify admin: Content › Files › Upload files.

    Step-by-step guide (opens in a new tab)

  • The theme editor (to add a Custom Liquid block; no code editing)

    How to get this: The theme editor
    1. Online Store › Themes › Edit theme (on a copy of your theme if you want to test first).
    2. Add section or Add block › Custom Liquid, paste the code, then Save.

    Step-by-step guide (opens in a new tab)

  • A duplicate of your theme to test on (optional, recommended, to preview the new font before customers see it)

    How to get this: A duplicate of your theme to test on
    1. Online Store › Themes › … on your theme › Duplicate.
    2. Make the change on the copy, preview it, and publish only when it works.

    Step-by-step guide (opens in a new tab)

1Add your font files

How it works

  1. Your font files are read in this browser tab; the name, weight and style come from the font’s own name and OS/2 tables.
  2. Converting compresses every font table with Brotli into the W3C WOFF2 format. Nothing is uploaded.
  3. You upload the WOFF2 files to Content › Files in Shopify.
  4. The code adds an @font-face rule per file, using Shopify’s file_url filter to find each file by name, and points your theme’s heading or body font variables at it.
  5. One Custom Liquid section in the header applies it to every page.

Guides

Questions

Why can’t I pick my own font in the theme editor?

Shopify themes use the font_picker setting, which only lists fonts in the Shopify font library. A font of your own is loaded with an @font-face rule instead, which is what this tool writes.

Which font files can I use?

TTF, OTF, WOFF and WOFF2, one file per weight and style. Font collections (.ttc) hold several fonts in one file: export the single styles you need first. Variable fonts work as one file.

Is the WOFF2 conversion lossless?

Yes. Every table in the font is kept byte for byte and compressed with Brotli, as the W3C WOFF2 format specifies. Only a digital signature (DSIG table) is removed, because a signature can’t survive any re-encoding; browsers ignore it anyway.

Do I need an app?

No. The font files go in Content › Files and the code goes in a Custom Liquid section in the theme editor. Nothing to install, no theme code edits, and deleting the section removes the font.

Is my font uploaded to your server?

No. The font is read, previewed and converted in this browser tab. The converter itself is downloaded from this site the first time you click Convert.

Based on the W3C WOFF2 specification, Shopify’s file_url filter, Custom Liquid sections, Dawn and Horizon.