Skip to content

Guide · Open source

How to use google-webfonts-helper: self-host Google Fonts

Updated · written with AI from the project's own documentation and checked against our catalogue data

google-webfonts-helper is an open-source web service for hosting a Google Font on your own server instead of loading it from Google. This guide shows you how to pick a font, choose the styles, character sets and file formats you need, and download the files with CSS snippets. You will also see where it fits compared with other options.

google-webfonts-helpermajodev/google-webfonts-helper · ★ 13.1k · MIT

Quick start

  1. 1Open the web app. Go to https://gwfh.mranftl.com in your browser. No install is needed to use the hosted service.
  2. 2Find your font. Search for the Google Font you want to self-host.
  3. 3Choose styles and subsets. Select the font variants and character subsets your project needs.
  4. 4Choose file formats. Select the formats you need, such as woff2 or ttf.
  5. 5Download the zip. Download the font files as a zip archive that includes CSS snippets.
  6. 6Add the files to your site. Place the font files on your server and reference them with the CSS snippets.

What google-webfonts-helper does

The project is described in its README as a hassle-free way to self-host Google Fonts. You choose a font, select the styles, character sets (subsets) and file formats you need, and download the result as a zip file together with CSS snippets to use the font.

The service supports .eot, .woff, .woff2, .svg and .ttf font file formats. Its homepage is https://gwfh.mranftl.com.

  • Font style and charset customization
  • CSS snippets included with the download
  • Font files downloaded as a zip archive

Open the web app and choose a font

There is no install step for the web app: open https://gwfh.mranftl.com in your browser and search for the Google Font you want. The README lists no prerequisites for using the service.

Confirm the font is on Google Fonts before you start. The tool only covers fonts that are available there.

Select styles, subsets and file formats

Before downloading, pick the variants (styles), character subsets and formats your project needs. Selecting only what you use keeps the download small and focused.

Choose woff2 for modern browsers, or add ttf or other formats if your project requires them. The formats are the ones the README names: eot, woff, woff2, svg and ttf.

  • Pick only the weights and styles your design uses
  • Pick only the subsets your content needs, such as latin
  • Pick the formats your project requires

Download the zip and the CSS snippets

After you make your selections, download the files as a zip archive. The CSS snippets are included so you can reference the font in your stylesheet.

Unzip the archive into your project's font directory, then add the CSS snippet to your stylesheet and serve the files from your own server.

Use the JSON API for scripted downloads

The README documents a JSON API. Requesting /api/fonts lists fonts, and /api/fonts/[id] returns data for a single font with optional subsets. Adding download=zip, subsets, formats and variants parameters returns a zip file with the selected options.

Use the API only if you need to automate downloads; the web app covers the same choices interactively.

  • GET /api/fonts
  • GET /api/fonts/[id]?subsets=latin,latin-ext
  • GET /api/fonts/[id]?download=zip&subsets=latin&formats=woff,woff2&variants=regular
GET /api/fonts/[id]?download=zip&subsets=latin&formats=woff,woff2&variants=regular

Run it on your own server (optional)

The README has a section on running gwfh on your own server, plus Development and Production build sections with a Quickstart. The source is cloned from the repository, which is the only install command given in the README.

The README's clone command is shown below. Check the README for the build and run steps before you deploy.

git clone https://github.com/majodev/google-webfonts-helper

What people use it for

  • Serving a Google Font from your own server instead of Google's CDN
  • Downloading only woff2 files for a modern web project
  • Getting ttf files for a project that needs them
  • Using the JSON API to script font downloads

Frequently asked questions

Is google-webfonts-helper free to use?

The project is released under the MIT licence, and its source is on GitHub. The README does not describe pricing for the hosted service, so check the homepage for current terms.

What font formats can I download?

The README lists .eot, .woff, .woff2, .svg and .ttf formats, downloaded as a zip file.

Do I need to install anything to use it?

The web app is used in the browser at https://gwfh.mranftl.com, and the README lists no prerequisites. The clone command in the README is only needed if you want the source code.

Why self-host Google Fonts instead of loading them from Google?

The README describes self-hosting as a way to host a Google font on your own server instead of loading it from Google. This matters for teams that prefer not to load third-party font files from Google.

Is it better than loading fonts from Google's CDN?

For a quick prototype, loading from Google's CDN is simpler. The README does not compare the two approaches directly, so weigh the simplicity against your need to serve files yourself.

What are the alternatives to google-webfonts-helper?

Comparable projects include google-fonts-webpack-plugin, fontsource and google-webfonts-helper-cli. Choose based on whether you want a web app, a build plugin or a command-line tool.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

google-webfonts-helper suits web developers and teams who want to serve Google Fonts from their own server in specific formats such as woff2 or ttf. If you only need a font for a quick prototype, or you need fonts that are not on Google Fonts, loading from Google's CDN or another option is likely the simpler choice.

Install options & downloads