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 Add Google Fonts to Your Website (3 Easy Ways)

Adding a Google Font takes two small jobs: load it, then use it. Here are three ways to do both, from the quickest copy-paste to hosting the files yourself, with code you can paste as it is.

Press the dice five times and the same page switches to five different fonts. FontMee, live, on a real page.

To add a Google Font to your website, you do two small jobs: load the font, then tell your text to use it. You can load it with a <link> tag in your page’s head, with an @import line at the top of your CSS, or from font files you host yourself. The quickest way to get the exact lines is the free FontMee extension: try the font on your own site, press Copy CSS and paste. Below are all three ways, with code you can copy as it is.

The easiest way: let FontMee write it for you

You do not need to understand code for this. Imagine you asked a friend: “I want this font on my website, what do I do?” The answer is five small steps:

  1. Install FontMee and open your website. It is free and needs no account. Click the FontMee icon and the panel opens beside your page.
  2. Click a font you like. Your real page changes at once, only on your screen. Not sure? Click another one, or press Random for a surprise. Want the headings to look different from the text? Choose Headings or Body first.
  3. Press Copy CSS, then Copy to clipboard. FontMee has now written the exact lines for the fonts you picked, so you copy nothing by hand.
  4. Paste it where your website keeps its styles, and save. In WordPress that is Appearance, Customize, Additional CSS. In Wix, Squarespace, Shopify or Webflow look for “custom CSS” or “custom code” in the design settings. With your own files, paste it at the very top of style.css.
  5. Refresh your website. Done. Visitors now see the font. If nothing changed, check that you pasted it at the very top and saved.
The easiest way to add a Google Font to a website in three steps with the free FontMee extension: click a font in the list, press Copy CSS and Copy to clipboard, then paste into your site's CSS box such as WordPress Additional CSS and save
Click, copy, paste: no code to write.

Cannot get to the CSS, or it all feels like too much? Paste the lines FontMee gave you into ChatGPT or Gemini and say “add this to my website”, or send them to whoever looks after your site. The three ways below are the same job, explained step by step.

What “adding a font” really means

Think of a font as a guest at a dinner party. First you have to invite it, which means your page has to download the font file. Then you have to give it a seat, which means telling your text to use it. Skip the invitation and the font never shows up. Skip the seat and it sits in the corner while your text keeps its old font.

Both jobs are written in CSS, the set of style rules that tells a website how to look. The invitation goes in the head of your page (a hidden area at the top of the HTML where the browser reads its setup instructions) or at the very top of your CSS file. The seat is one short rule, like the one in the examples below. Whichever way you pick, those two jobs stay the same.

Adding a Google Font to a website is two jobs: invite the font by loading its file with a link tag or an @import line, then give it a seat with a font-family rule in CSS
Load the font first, then tell your text to use it.

Way 1: A link tag in your page’s head

This is the method Google shows on its own website. You put three lines in the head of your page: two that tell the browser to get ready to connect to Google, and one that loads the font. It usually loads a little sooner than the other ways, because the browser can start fetching the font before it has even read your CSS.

“I picked a font. How do I add it with the link tag?”

  1. Pick the font in FontMee, press Copy CSS and open the HTML tab. You see the exact lines for your font. (Without FontMee: on fonts.google.com open the font, press Get font, then Get embed code and copy the <link> lines. The buttons may be named a little differently.)
  2. Press Copy to clipboard.
  3. Open your page's HTML and paste the lines between <head> and </head>. That is the hidden area at the top of the page. Save.
  4. Refresh the page. The rule at the end of the pasted lines already tells your text to use the font.
Add a Google Font with the link tag in three steps: copy the lines from the HTML tab of the free FontMee extension, paste them inside the head of your page, and your text now uses the font
Way 1 in a picture: copy, paste into the head, done.
<head>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lora:wght@400;700&display=swap">
  <style>
    h1, h2 { font-family: 'Lora', serif; }
  </style>
</head>

The last bit of the link, display=swap, tells the browser to show your text in a backup font right away and swap in the real one when it arrives, so visitors never stare at blank space. The word after the comma in your rule (serif) is that backup, and Google recommends always adding one. Use this way when you can edit your page’s HTML.

Way 2: An @import line at the top of your CSS

Sometimes you cannot touch the head of the page, only the CSS. That is the case with the Additional CSS box in WordPress, the CSS section of many website builders, or a plain style.css file. Then the invitation can live inside your CSS instead, as one line that has to sit at the very top, above every other rule.

“I can only edit CSS. How do I add my font?”

  1. Pick the font in FontMee, press Copy CSS and stay on the CSS tab. (Without FontMee: on fonts.google.com press Get font, then Get embed code, choose @import and copy it.)
  2. Press Copy to clipboard.
  3. Open your CSS (the Additional CSS box in WordPress, the CSS box of your builder, or style.css) and paste at the very top, above everything else. An @import only works as the first line. Save.
  4. Refresh the page. The rules FontMee wrote for your headings and text are already in the pasted block.
Add a Google Font with @import in your CSS in three steps: copy the lines from the CSS tab of the free FontMee extension, paste them at the very top of your CSS box or style.css, and your text now uses the font
Way 2 in a picture: copy, paste at the very top, done.
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&display=swap');

h1, h2 { font-family: 'Lora', serif; }

It is the simplest one to paste, but it is usually a touch slower than the link tag, because the browser only discovers the font after it has read your CSS. On a small site you will hardly notice.

Way 3: Host the font files yourself

Here you download the font files from Google, upload them to your own website and point to them, so your visitors’ browsers never contact Google at all. Some people choose this for privacy, some for speed, and some because rules about it differ from country to country, so check what applies to your visitors. It takes a few more steps, but nothing is hard: you copy a folder, then add a rule that says where the file lives.

“I want everything on my own server. How do I host the font?”

  1. Pick the font in FontMee, press Copy CSS, then Download self-hosted ZIP. FontMee downloads the font files for you, so you do not hunt for them.
  2. Unzip the file. You get a fonts folder with the font inside, a fonts.css, a fontmee.css and a short README.
  3. Upload the whole folder to your website, the same way you upload images (hosting File Manager or FTP).
  4. Add two lines inside the <head> of your page, then refresh. If you put the folder in a subfolder, adjust the paths.
Host a Google Font yourself in four steps: press Download self-hosted ZIP in the free FontMee extension, unzip the fonts folder and two CSS files, upload the folder to your website and add two stylesheet lines in the head
Way 3 in a picture: download, unzip, upload, two lines.
<link rel="stylesheet" href="fonts.css">
<link rel="stylesheet" href="fontmee.css">
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

h1, h2 { font-family: 'Lora', serif; }

Google Fonts are open source, so you may download and host them, including for commercial projects. The slow part is finding and downloading every file and writing every @font-face block by hand. FontMee does that for you, as you will see in a moment.

Which way should you pick?

  • You can edit your page’s HTML: use the link tag (Way 1).
  • You can only edit CSS, or you use a website builder with a CSS box: use @import (Way 2).
  • You want visitors’ browsers to load everything from your own server: host the files (Way 3).
Which way to add Google Fonts should you pick: the link tag if you can edit your page's HTML, @import if you can only edit CSS, or self-hosted font files if you want everything from your own server
Not sure? Start with way 1 or 2: only one line changes later.

Not sure? Start with Way 1 or Way 2. You can switch later, and only the one line that loads the font changes. Picked a font? See which headline and text fonts look good together in the best Google font pairings for websites.

Get the exact code with FontMee

Typing these lines by hand is where most mistakes happen: a missing plus sign, a weight the font does not have, a rule that does not match your headings. FontMee is a free Chrome extension, a small add-on that gives the browser one new feature, and it writes the lines for you. You try a font on your real site first, see how it looks, then copy the code for exactly that choice. It has more than 1,900 fonts, and the video shows the panel at work. Want to try a font on any page before you copy code? Here is how to change the font on any website in Chrome.

  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 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. Choose where the font goes. Under Apply changes to pick Everything, Headings or Body, then click a font. You can do headings and body text separately.
  4. Check it on the real page. Switch between Original font and FontMee preview, and use Tune for size, weight and line height until it looks right.
  5. Press Copy CSS. A window opens with four tabs: CSS (the @import way), HTML (the link tag way), Variables and Tailwind for people who use those. Pick the tab that matches your way, press Copy to clipboard and paste it into your site. FontMee only asks Google for weights the font really has, so you do not end up with a broken link.
  6. Want Way 3? Press Download self-hosted ZIP in the same window. You get a folder with the font files, a fonts.css, a fontmee.css and a short README. Upload the folder and add the two stylesheet links.
Get the exact Google Fonts code with FontMee: try the font on your real site, press Copy CSS, pick the CSS, HTML, Variables or Tailwind tab and paste it into your site, or download the self-hosted ZIP
FontMee writes the code for exactly the font and weights you chose.

Four things to check before you publish

  • Load only what you use. Every extra font and weight makes your page a little heavier. Two fonts and two weights are plenty for most sites.
  • Keep a backup font. End every font-family with a generic name like serif or sans-serif, so text still looks fine while the font loads.
  • Check the letters you need. Accents like ł, č and ş, and Cyrillic or Vietnamese letters, are not in every font. Preview your own words in FontMee before you copy.
  • Check the licence. Google Fonts are open source and free for commercial use. The FontMee code window lists each font’s licence, so you can see it before you publish.

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. Font working? Here is how to publish the web page your AI made, free and paid options. 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.

Ready to use your own font file? Here is how to use a custom font on your website and test it first.

Good to know before you start

  • A preview changes your screen only. Other visitors see the normal fonts until you add the code to your site.
  • The code is a starting point. If a font does not change somewhere, add !important after its value. FontMee’s note at the top of the code says the same.
  • Fonts are fetched from Google Fonts and Fontshare when you preview them. So you need an internet connection.
  • 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

Pick the font, load it with a link tag in your page’s head or an @import line at the top of your CSS, then use it with a font-family rule. FontMee can write both lines for you after you try the font on your site.

Yes. Google Fonts are open source and free, including for commercial projects. FontMee lists each font’s licence when you copy the code.

The link tag in the head usually loads a little sooner, so use it when you can edit your HTML. @import is perfect when you can only edit CSS. Both work.

Paste the CSS where your site keeps its custom styles. FontMee’s code window suggests WordPress (Customizer, Additional CSS), Shopify (theme editor), Webflow (Custom code) or your own style.css.

Usually another rule on the page is stronger. Add !important after the font name in your rule, check that the @import is the very first line of your CSS, and clear your cache. FontMee’s code starts with a note about both.

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 — 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)