How do I add a custom font to my Shopify theme?
First check whether your font is already in Shopify's font library. If it is, you do not need code: open the theme editor, go to Theme settings, then Typography, and pick it from the font list. If it is not, upload the font file (ideally .woff2) and add one @font-face rule that points to it, then tell your theme's CSS to use that font name.
We tested both routes, plus Google Fonts, on a Shopify development store on 12 October 2026. All three fonts loaded in the browser. The details below are what Shopify actually returned, including the two error messages a broken font setting produces.
Is my font already in Shopify's font library?
Check before you upload anything. Shopify describes its library as "a collection of fonts that includes system fonts and a selection of Google fonts", and every font in it is free to use on any Shopify store. The full list is the Available fonts table on Shopify's developer page for theme fonts.
The library is bigger than people expect. In our test, Geist (a 2023 typeface) was in it: setting the theme's font to geist_n4 loaded Geist from Shopify's own font server with no file uploaded. What the library does not have is fonts you bought from a foundry, most Adobe Fonts, and some fonts Shopify says it cannot include for licensing reasons. Those need the upload route.
Which way of adding a font should I use?
| Route | Needs code? | Where the file lives | Theme check result in our test | Best for |
|---|---|---|---|---|
| Font picker in the theme editor | No | Shopify's font server (/cdn/fonts/) | 0 offenses | Any font in the library |
Upload to the theme's assets folder, load with asset_url | Yes, one @font-face rule | Your theme (/cdn/shop/t/<theme>/assets/) | 0 offenses | Developers working with Shopify CLI or a ZIP |
Upload to Content, then Files, load with file_url | Yes, one @font-face rule | Your store's Files | Not tested | Store owners editing code in the Shopify admin |
Google Fonts <link> tag | Yes, two lines | Google's servers | 2 warnings: RemoteAsset | Quick tests; a Google font missing from the library |
| Adobe Fonts (Typekit) embed code | Yes | Adobe's servers | Not tested | Fonts you already license through Adobe |
Uploading the font into your theme or your Files keeps it on Shopify's servers, the same place as the rest of your store. Google Fonts and Adobe Fonts both work, but each makes the visitor's browser connect to another company's server first, which is why shopify theme check flags the Google Fonts link with "Asset should be served by the Shopify CDN for better performance."
How do I upload a font file and use it?
Shopify's documentation gives two places to put the file, and the choice depends on where you edit code.
- Get a
.woff2file. It is the smallest web font format. If you only have.ttfor.otf, convert it with a font converter first. - Upload it. If you edit code in the Shopify admin, go to Content, then Files, and upload it there. Shopify's documentation warns that uploading some font types into the theme's assets folder through the admin code editor "might lead to file corruption". If you work locally with Shopify CLI or edit a theme ZIP, put the file in the
assetsfolder instead. - Add an
@font-facerule. Put it inside a{% style %}tag inlayout/theme.liquid, before the closing</head>. For a file in Files, usefile_url:
{% style %}
@font-face {
font-family: "Brand Sans";
src: url({{ 'brand-sans.woff2' | file_url }}) format("woff2");
font-weight: 400;
font-display: swap;
}
{% endstyle %}For a file in the theme's assets folder, the only change is the filter: {{ 'brand-sans.woff2' | asset_url }}. That is the version we tested, and Shopify served our file from the theme's CDN path with status 200 and type font/woff2.
- Apply it. Add a rule such as
h1, h2, h3 { font-family: "Brand Sans", sans-serif; }to the same style tag. Many themes route fonts through CSS variables instead; Dawn, for example, uses--font-heading-familyand--font-body-family, so overriding those changes every heading or every paragraph at once. - Add one rule per weight. Bold and regular are separate files. Repeat the
@font-faceblock with the bold file andfont-weight: 700, or the browser fakes bold by smearing the regular weight.
What happened when we tested it on a real store?
We pushed a small test theme to a development store with Shopify CLI 3.93.1, loaded it in Chromium, and asked the browser which fonts it had loaded. All three test fonts reported as loaded.
| What we tested | What Shopify did |
|---|---|
Font picker set to assistant_n4, printed with font_face | Wrote an @font-face rule with a .woff2 and a .woff file from /cdn/fonts/assistant/. Font loaded. |
Bold version with font_modify: 'weight', 'bold' | Returned weight 700 with its own pair of files. Font loaded. |
font_display: 'swap' on font_face | Added font-display: swap; to the rule |
Our own 28,356 byte .woff2 in assets | Served at /cdn/shop/t/96/assets/, status 200, type font/woff2. Font loaded. |
A 125,956 byte .ttf in assets | Uploaded without complaint, then served as a 45,216 byte woff2 file under the .ttf name |
Google Fonts <link> for Lora | Font loaded; theme check gave 2 RemoteAsset warnings, 0 errors |
The .ttf result surprised us: Shopify's CDN converted the file to WOFF2 on the way out. It worked, but it is undocumented, so we would still upload .woff2 rather than rely on it.
Why does my theme say "default is required" or "default is invalid" for a font?
Both come from a font_picker setting in the theme's settings file, the setting that puts a font dropdown in the theme editor. Every font_picker needs a default, and the default must be a font handle from Shopify's library, not a font name.
| Default in the setting | What shopify theme push returned | Did shopify theme check catch it? |
|---|---|---|
| None | setting with id="type_body_font" default is required | Yes: Missing property "default", as an error |
"comic_sans_ms_n4" (not in the library) | setting with id="type_body_font" default is invalid | No |
"Assistant" (a family name, not a handle) | setting with id="type_body_font" default is invalid | No |
"assistant_n4" | Pushed successfully | No offenses |
A handle is the font's name in lowercase with underscores, then a style code: n4 is normal at weight 400, n7 is normal bold, i4 is italic. Copy it from the Available fonts table rather than guessing. Note that theme check passes an invalid handle, so a clean check does not mean the upload will work; the same gap shows up in other upload errors, covered in why a Shopify theme ZIP will not upload. A font you uploaded yourself can never be a font_picker default, because the picker only offers library fonts.
Will a custom font survive a theme update?
The file will, the code may not. Fonts in Content, then Files belong to the store, not the theme, so they stay when you update or switch themes. The @font-face rule you added to theme.liquid is a code edit, and Shopify does not carry code edits into an updated theme version. Keep a copy of the rule and check it after every update; we explain what does and does not carry over in will I lose my customizations if I update my Shopify theme.
Am I allowed to use a font I bought on my store?
Only if the licence covers web use. A desktop licence lets you use a font in documents and graphics on your own computer; putting the file on a website usually needs a separate web font licence, often priced by monthly page views. Check the licence before you upload. Google fonts in Shopify's library or on Google Fonts are released under open licences that allow web use.
Where these numbers come from
On 12 October 2026 we built a minimal theme with one font_picker setting, a Google Fonts link and two uploaded font files (Geist, released under the SIL Open Font License), pushed it to a Shopify development store as an unpublished theme with Shopify CLI 3.93.1, read the rendered HTML, fetched each font URL, and checked document.fonts in Chromium. We then pushed four variations of the font setting's default and ran shopify theme check on each. The test theme was deleted afterwards. Documentation quotes are from Shopify's theme fonts page and Help Center Files page, read the same day. If you would rather start from a theme that already has its fonts chosen, every theme in our free theme gallery sets them in the theme editor, with nothing to code.
Frequently asked questions
How do I change the font on my Shopify store without code?
Open the theme editor, go to Theme settings, then Typography, and choose a font from the list. That list is Shopify's font library, which includes system fonts and a selection of Google fonts, all free to use.
Can I upload my own font to Shopify?
Yes. Upload a .woff2 file to Content, then Files (if you edit code in the Shopify admin) or to the theme's assets folder (if you use Shopify CLI or a ZIP), then add an @font-face rule using the file_url or asset_url filter. The font will not appear in the theme editor's font list; you apply it with CSS.
Where do I put the @font-face code in a Shopify theme?
Inside a {% style %} tag in layout/theme.liquid, before the closing head tag. That way the Liquid filter that builds the file's address runs, and the rule applies on every page.
What font format should I upload to Shopify?
.woff2. It is the smallest web font format. In our 12 October 2026 test Shopify also accepted a .ttf in the assets folder and served it as WOFF2, but that is undocumented, so convert the file yourself.
What does "setting with id default is invalid" mean for a font_picker?
The font_picker setting's default is not a valid font handle from Shopify's library. Use a handle such as assistant_n4, not a family name like Assistant and not a font you uploaded. shopify theme check did not catch this in our test; only the push did.
Does Google Fonts slow down a Shopify store?
It adds a connection to Google's servers before the font can load, which is why shopify theme check warns with RemoteAsset. The font still works. Uploading the same font to your store, or picking it from Shopify's library if it is there, avoids the extra connection.
Will my custom font disappear when I update my theme?
The font file in Content, then Files stays, because it belongs to the store. The @font-face code you added to the theme is a code edit, and Shopify does not carry code edits into a new theme version, so re-add it after updating.
Generate a theme that looks like your brand
A complete Shopify 2.0 theme with conversion features built in, ready in minutes. No credit card required.
Generate my theme freeNo Shopify store yet? Start one here, then bring the theme. Themr may earn a commission if you start a paid plan; it does not change what you pay.