This post contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you. Full disclosure →
🔤 Design Tools October 2026·7 min read

How to Use a Custom Font on Your Website (Test It First)

A custom font is a font file you already have: a .woff2, .ttf or .otf. Here is how to see it on your real website first, then put it online the right way, step by step.

The same GetPlugzz web page shown twice with the same words: on the left in its original font, on the right in a custom .woff2 font previewed live with the free FontMee extension, which tests any font on any website without changing the real siteOriginal fontFontMee preview · my_brand_sans.woff2
◂▸
Drag the slider to compare
FontMee previews any font on any website, liveOnly your own screen changes. Nothing is uploaded and the real website stays exactly as it is.

To use a custom font on your website, you upload the font file to your site, tell your CSS where it is with an @font-face rule, and then use it with font-family. Before you do any of that, you can test the font on your real pages: with the free FontMee extension you load a .woff2, .ttf or .otf file from your computer and see it on any website in one click, without changing anything and without uploading anything.

The whole job of using a custom font on a website in three steps: test the font on your real page with FontMee, put the font file on your website, then tell your CSS the font exists with an @font-face rule
The whole job at a glance: test, upload, tell your CSS.

What a custom font is

A custom font is simply a font file that is neither one of the fonts every computer already has nor one of the free fonts on Google Fonts. It might be a brand font from a designer, a font you bought, or one you made. It usually comes as a file ending in .woff2, .woff, .ttf or .otf. No file yet? Our guide to adding Google Fonts covers the free ones.

For websites, .woff2 is the best choice: it is small, so pages load faster, and all current browsers can read it. .ttf and .otf are the formats you use on a computer. They also work in browsers, but the files are bigger. If you only have a .ttf or .otf, that is fine for testing. Choosing a headline font and a body font? See the best Google font pairings for websites.

Meaning of the font file endings: .ttf is TrueType, the classic computer font, .otf is OpenType with extra features, .woff is the Web Open Font Format made for websites and .woff2 is its newer, smallest version at 100 KB against 214 KB for .ttf, so .woff2 is best for a custom font on a website
What each ending means, and why .woff2 is the one to use on a website.

Step 1: Test it on a real website first

Uploading a font and writing code just to find out you do not like it wastes an afternoon. FontMee is a free Chrome extension, a small add-on that gives Chrome one new feature, and it lets you try fonts on a live page first. It accepts your own files too. The short video shows the panel.

  1. Install FontMee. Add it from the Chrome Web Store. It is free and needs no account. Click the puzzle icon in Chrome and pin it, so it is always one click away.
  2. Open a page of your website and click the FontMee icon. The panel opens beside the page. You can also press Alt + Shift + F. Chrome’s own pages (New Tab, the Web Store, chrome:// pages) cannot be changed.
  3. Press Upload and choose your font file. You can pick several files at once, up to 6 MB each. FontMee names the font after the file, so my_brand_sans.woff2 becomes my brand sans.
  4. Find it under My fonts. Your uploads have their own filter and are marked Yours. Hover over one to rename it with the pencil or delete it with the bin.
  5. Click your font and compare. The page changes at once. Flip between Original font and FontMee preview to see the difference.
Uploading your own font into the free FontMee extension in three steps: press Upload and pick a .woff2, .woff, .ttf or .otf file, see it at the top of the list marked Yours under My fonts, and hover it to rename it with the pencil or delete it with the bin
Upload your own font into FontMee and see it on the page.

Your font files stay in your browser, on your computer. Nothing is uploaded, and the test only changes what you see, so nobody else notices. Want to show the result to a client? FontMee can make a before and after picture: here is how. Want to try other fonts on any page first? Here is how to change the font on any website in Chrome.

What else FontMee does with your font

Testing your own file is only the start. FontMee has a few more tools that help while you decide:

Five more FontMee tools for testing your own font: a slider to compare before and after, changing only headings, body text or one element, a list of the fonts a page uses now, curated font pairings and a big movable window
FontMee does more than preview: compare, target, check, pair.

Step 2: Put the font file on your website

Right now the font file is only on your computer. A visitor's browser can only load files that are on the internet, so the font has to travel to your website, just like a photo you upload. Here is the simple version:

  1. Find where your website's files are kept. Usually this is your hosting's File Manager, a page in your hosting account that shows your site's files a bit like Windows Explorer. WordPress and website builders have a media or font upload area instead.
  2. Make a new folder called fonts. Put it next to your index.html.
  3. Upload your .woff2 file into the fonts folder. Do it the same way you upload an image.

When you are done, the folders could look like this:

your-website/
  index.html
  style.css
  fonts/
    my-brand-sans.woff2
    my-brand-sans.ttf

Tip: use simple, lowercase file names with no spaces (my-brand-sans.woff2, not My Brand Sans (1).woff2). It avoids a classic cause of “my font does not show up”.

Put a custom font file on your website in three steps: open your hosting File Manager, make a folder called fonts next to index.html and upload your .woff2 file into it with a short lowercase file name
Put everything in a fonts folder next to your page.

Step 3: Tell your CSS about the font

Uploading is not enough yet: your page does not know the file exists. CSS is the file with the rules for how your page looks (colors, sizes, fonts), and you add two short rules to it. The first one introduces the font (“it is called My Brand Sans and lives here”). The second one says where to use it (“use it for all the text”).

@font-face {
  font-family: 'My Brand Sans';
  src: url('/fonts/my-brand-sans.woff2') format('woff2'),
       url('/fonts/my-brand-sans.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'My Brand Sans', sans-serif;
}

h1, h2 {
  font-family: 'My Brand Sans', serif;
}

Line by line, in plain words:

  • font-family: 'My Brand Sans' in the first block: the name you give the font. Invent any name, but use the same name again below.
  • src: url('/fonts/my-brand-sans.woff2'): where the file is on your site. If your folder or file name is different, change it here.
  • font-display: swap: shows your text in a backup font until the real one has arrived, so visitors never stare at empty space.
  • body { font-family: 'My Brand Sans', sans-serif; }: use the font for the whole page. The word after the comma (sans-serif) is the backup font, and it is good practice to always add one.

Where do you paste this CSS? Wherever your site keeps its styles: in style.css, in WordPress under Appearance, Customize, Additional CSS, or in your website builder’s custom CSS box.

CSS @font-face rule explained: font-family is a name you invent, src points to the woff2 file with a ttf backup, font-display swap shows backup text until the custom font arrives, and the font-family rule ends with a backup font like sans-serif
Four lines do the work: a name, the file location, swap, and a backup font.

The shortcut: let FontMee write it

Writing that by hand is easy to get wrong, so FontMee can do it for you. Choose the way you like better.

Shortcut 1: let FontMee write the CSS

  1. In FontMee, press Copy CSS, then Copy to clipboard.
  2. Open your style.css and paste at the very top.
  3. FontMee puts the @font-face line inside a comment, because your file is not on the internet yet. Remove the /* and */ around that line, and check that the path matches your fonts folder.
Shortcut with the FontMee extension in three steps: press Copy CSS in the FontMee panel, press Copy to clipboard in the CSS for your site window, then paste the code at the very top of style.css and remove the comment marks around the @font-face line
FontMee writes the CSS for you: copy it, paste it, and uncomment the @font-face line.

Shortcut 2: let FontMee build the folder

  1. Press Copy CSS, then Download self-hosted ZIP.
  2. Unzip it. You get a fonts folder with your font inside, a fonts.css with the @font-face block, a fontmee.css with your rules and a short README.
  3. Upload the whole folder to your site, then add these two lines inside the <head> of your page. If you put the folder in a subfolder, adjust the paths.
<link rel="stylesheet" href="fonts.css">
<link rel="stylesheet" href="fontmee.css">
Shortcut with the FontMee extension in three steps: press Download self-hosted ZIP, unzip the folder that holds your font in fonts, fonts.css, fontmee.css and a README, then upload it to your site and link the two stylesheets inside the head of your page
FontMee builds a ready folder: upload it and link the two stylesheets.

Not comfortable with code? Three easy ways

CSS is the part most beginners dislike, and you do not have to do it alone. Pick the route that suits you:

  • Ask an AI. Press Copy CSS in FontMee, paste the code into ChatGPT or Gemini together with your page's code, and say: “Add this font to my website.” Check the result in a preview before you publish.
  • Use your website builder. WordPress, Wix, Squarespace and many others have a place to upload a font file in their design or theme settings, so you never touch CSS. Look for “custom fonts”.
  • Send it to your developer. Give them the font file and the CSS from FontMee, or the self-hosted ZIP. It is a five-minute job for someone who knows the site.
Three easy ways to add a custom font if you do not like code: ask an AI such as ChatGPT or Gemini to add the CSS from FontMee to your website, use the font upload of your website builder, or send the font file and CSS to your developer
CSS feels hard? Let an AI, your builder or your developer do it.

Once the font works, here is how to publish the web page your AI made, free and paid options.

Four things to check before you publish

  • Check the licence. A font file on your computer is not automatically free to put on a website. Many licences cover desktop use only and have a separate web licence. FontMee reminds you with “your own file: check its licence before publishing”. When in doubt, ask where you got the font.
  • Check your letters. Type words with your special characters (č, ć, ž, ä, ñ, é) in the sample box. A font can look perfect and still be missing some letters, and then those letters appear in a backup font.
  • Keep a backup font. End every font-family with serif or sans-serif, so text still looks fine while the font loads.
  • Keep it light. One or two font files are plenty. Every extra file makes the page a little heavier, so choose .woff2 when you can.
Four checks before publishing a custom font on your website and why each matters: the font licence for web use, special letters such as č, ä and ñ, a backup font in font-family, and keeping the page light with only one or two woff2 files
Check these four things, and know why, before anyone opens your page.

No website yet? Then the font comes second. A site also needs a home to live in, and a builder is the quickest way to get one without code. For the whole path from idea to a live site, read how to launch your first website with a domain, hosting and favicon.

Get the extension

FontMee is free, with 1,900+ fonts, Copy CSS in four formats, a self-host ZIP and your own font uploads. No account, no subscription. Add it from the Chrome Web Store, or read the FontMee page first.

Good to know before you start

  • A preview changes your screen only. Other visitors see the normal fonts until you upload the file and add the code to your site.
  • Your font files stay on your computer. FontMee keeps them in your browser and never sends them anywhere.
  • Each file can be up to 6 MB. Most fonts are far smaller. FontMee tells you if one is too big.
  • Text inside pictures cannot change. Only real, selectable text does.
  • Previewing a font is not a licence. Google Fonts are open source and Fontshare fonts are free to use. For fonts you upload yourself, check the licence first.

FAQ

Upload the font file to your site, add an @font-face rule in your CSS that points to it, then use the font name in a font-family rule. You can test the font first with FontMee, which loads your own file on any page without changing the real site.

Use .woff2 if you can. It is the smallest and every current browser reads it. .ttf and .otf also work in browsers, but the files are larger. In the @font-face block you can list a .woff2 first and a .ttf after it as a backup.

Most often the path inside url() does not match where the file really is, or the file name differs by a letter or a capital. Check that the file opens when you type its address in the browser, make sure the font-family name in your rule matches the @font-face name exactly, and clear your cache. A stronger rule elsewhere can also win: try adding !important after the font name.

No. FontMee keeps uploaded fonts in your browser on your computer and uses them only to show the preview on your screen. Nothing is uploaded to a server.

The CSS goes into Appearance, Customize, Additional CSS, or into your theme’s font settings. Where the font file lives depends on your theme and hosting: many themes and page builders have a place to upload fonts, and otherwise you can put the file in a folder on your hosting. FontMee’s Copy CSS gives you the rules to paste.

Yes. All 1,900+ fonts, every layer, Copy CSS, the self-host ZIP and uploading your own fonts are free, with no account and no limits.

FontMee takes .woff2, .woff, .ttf and .otf files, up to 6 MB each, and you can choose several at once. For your own website, .woff2 is the best format because it is the smallest.

No. FontMee only changes what you see on your own screen. Visitors see the font only after you upload the file to your site and add the CSS.

Yes. The file stays in your browser on your own computer. FontMee does not send it anywhere, so a paid or private brand font is not shared with anyone.

🔤

FontMee — Free, 1,900+ Fonts

Made by GetPlugzz. Free, with no account and no tracking.

INSTALL

Free PDF guide: try any font on any website like a pro

Every FontMee button explained in 10 short pages: the 4 layers, the font library, tuning, pairings, before / after, Copy CSS and keeping what you like. Enter your email and the download starts right away.

We add your email to the GetPlugzz newsletter (new posts, tools and extensions). No spam, and you can unsubscribe any time. Privacy

Bluehost hosting

Still deciding on hosting?

Bluehost's AI builder bundles hosting with an AI-generated starting point, so you skip the blank page. Check their page for current plans and pricing before you decide, because offers change.

Start building → (paid link)
Weblium website builder

Prefer a builder over WordPress?

Weblium lets you build a site without code, by editing the page directly. Check their page for current plans and pricing before you decide, because offers change.

Create a site → (paid link)