---
title: "Font Fingerprinting Explained: How Sites Detect Your Fonts"
description: "Font fingerprinting reads your installed fonts by measuring text or via Local Font Access. Learn how it works, how to check yours, and how to cut exposure."
url: https://cdnping.org/en/blog/font-fingerprinting-explained
language: en
published: 2026-10-29
category: "IP & privacy"
tags: ["font fingerprinting","browser fingerprinting","privacy","Local Font Access","browser settings"]
source: cdnping.org
license: Free to quote and summarize with a link to the url above.
---
# Font Fingerprinting Explained: How Sites Detect Your Fonts

Font fingerprinting is a way for a website to tell devices apart based on which fonts are installed on your computer and how wide and tall those fonts render. It needs no cookie and no permission from you, and an ordinary web page can do it in a few dozen lines of JavaScript. To see what you expose, open [cdnping's IP and environment check](/en/ip) and look at the "timezone, language, fonts" item. To reduce exposure, rely on the browser's own restrictions rather than plugins that fake values.

Fonts are only one signal in a browser fingerprint. If you are not yet clear on how fingerprinting works as a whole, start with [What is a browser fingerprint: 20+ signals that identify you without cookies, and how to self-check](/en/blog/browser-fingerprint-explained-self-check).

## How does a website know which fonts I have installed?

Browsers do not expose a public "list all fonts" API to ordinary web pages. Sites use two indirect or gated methods instead.

### Method 1: measure the width and height of text

The idea is simple. CSS `font-family` accepts a list of fallback fonts, and the browser uses the first one that exists:

1. The page places a piece of text off-screen, sets its font to `monospace`, and records its width and height as a baseline.
2. It changes the font to `"SomeFont", monospace` and measures again.
3. If the size changed, "SomeFont" exists and was used. If not, it most likely does not exist and the browser fell back to `monospace`.

Run this against a candidate list (dozens to hundreds of common font names) and you get a list of the fonts you have installed. It is fast, and nothing visible changes on the page.

Measurement leaks more than presence. The same font can differ by a pixel or two in width or height across OS versions, font versions and rendering settings. This is what Fifield and Egelman studied in their 2015 paper "Fingerprinting web users through font metrics": instead of guessing font names, they measured the rendered size of many Unicode characters and found that glyph sizes alone could distinguish a considerable share of users, and that a small set of high-discrimination characters was enough to get close to the same result. The study is more than ten years old and browser defenses have changed, so check the paper for exact figures, but the conclusion still holds: measuring rendered output can tell devices apart.

### Method 2: the Local Font Access API

This is an official interface in Chromium-based browsers (Chrome, Edge and others), intended for online design tools. It lets a page read the full list of local fonts, including family name, full name, PostScript name and style.

Unlike Method 1, it has a permission gate:

- it can only be called on HTTPS pages;
- it must be triggered by a user action such as a click;
- on first use the browser shows a prompt along the lines of "Allow this site to see and use fonts on your device." If you click Block, the page gets nothing.

So the API itself is reasonably safe as long as you do not click Allow on sites that have no need for it. Firefox and Safari do not currently implement it.

## Why is the font list of Chinese-language users easier to tell apart?

Font fingerprinting only works if your list differs from other people's. Computers with only the stock system fonts look much alike. The software environment of Chinese-language users often brings in many extra fonts:

| Source | Example fonts | Why it adds distinguishing power |
|---|---|---|
| OS and language packs | Microsoft YaHei, DengXian, SimSun, FangSong, KaiTi on Windows; PingFang on macOS | Fairly common, but font versions and metrics differ slightly between OS versions |
| Office suites | Some office software installs a batch of Chinese fonts | Whether it is installed, and which version, varies from person to person |
| Design and typesetting software | Designers often install the Source Han family and commercial font packs from various type foundries | Combinations are highly scattered, so a design machine's font list is often unique |
| Phone-maker and brand fonts | Freely downloadable brand fonts such as HarmonyOS Sans and MiSans | Only some people install them on a computer |
| Games, input method skins, printer drivers, etc. | Depends on the software | Scattered and unpredictable, which is exactly why they distinguish well |

One easily overlooked detail: Chinese fonts usually have both a Chinese name and an English name (for example "微软雅黑" and "Microsoft YaHei"), and detection scripts try both. Fallback rules for Chinese characters also differ from those for Latin text. None of this makes you safer; it just adds another dimension to the measurement.

A distinctive font list does not mean a site is using it to track you. Many sites fingerprint to spot bots and abnormal logins. The point of understanding it is to know what you expose, then decide whether to tighten things.

## How can I see which fonts I expose?

The three steps below can be followed directly, from "what is installed on this machine" to "what a web page can see."

### Step 1: list the fonts installed on your machine

**Windows (PowerShell):**

```powershell
# System-wide fonts
Get-ChildItem C:\Windows\Fonts | Select-Object Name
# Fonts installed for the current user only (many apps install here)
Get-ChildItem "$env:LOCALAPPDATA\Microsoft\Windows\Fonts" -ErrorAction SilentlyContinue | Select-Object Name
```

**macOS:**

```bash
# Fonts you installed yourself
ls ~/Library/Fonts
# Full list (slow)
system_profiler SPFontsDataType | grep "Full Name"
```

**Linux:**

```bash
# All font family names
fc-list : family | sort -u
# Only fonts that support Chinese
fc-list :lang=zh family | sort -u
```

Fonts in the user directory were almost all added by you or by some application, and they are the part that makes you different from everyone else.

### Step 2: test in the browser console

Open any web page, press F12 to open the console, and paste the code below. It uses the width-and-height method described above. You can replace the candidate list with the fonts you found in Step 1:

```js
(() => {
  const fonts = ['Microsoft YaHei', '微软雅黑', 'DengXian', 'SimSun', 'KaiTi', 'FangSong',
                 'PingFang SC', 'Source Han Sans SC', '思源黑体', 'HarmonyOS Sans SC', 'MiSans'];
  const bases = ['monospace', 'serif', 'sans-serif'];
  const span = document.createElement('span');
  span.textContent = '字体指纹测试 mmmmmmmmlli WwQq 0123';
  span.style.cssText = 'position:absolute;left:-9999px;font-size:72px;white-space:nowrap';
  document.body.appendChild(span);
  const size = f => { span.style.fontFamily = f; return span.offsetWidth + 'x' + span.offsetHeight; };
  const base = Object.fromEntries(bases.map(b => [b, size(b)]));
  const rows = fonts.map(f => ({
    font: f,
    detected: bases.some(b => size(`"${f}", ${b}`) !== base[b])
  }));
  span.remove();
  console.table(rows);
})();
```

Rows with `detected: true` are fonts a web page can detect. Two notes:

- If a font happens to be the system's default fallback for Chinese characters, it may be misjudged as "not present," which is why the script compares against three baseline fonts;
- If you run the same code in a Firefox private window or in Safari, you will find that most of the third-party fonts you installed show `false`. That is the browser restriction described below at work.

You can also check the Local Font Access permission state (Chromium-based browsers only):

```js
navigator.permissions.query({ name: 'local-fonts' }).then(s => console.log(s.state));
```

`granted` means the current site is already allowed to read your full font list, `prompt` means you have not been asked yet, and `denied` means you refused.

### Step 3: see the combined result on cdnping

Open [/en/ip](/en/ip). The environment check lists the timezone, language and font results next to your IP information so you can compare them. The fingerprint is computed locally in your browser and is not uploaded, so cdnping has no statistics such as "how many users have font X installed." What you see is only your own device. For how to read the other checks, see [How to read a browser environment check: all 13 checks explained](/en/blog/browser-environment-check-explained).

## How do I reduce font fingerprint exposure?

The goal is to make your font list look like many other people's, not to make it undetectable. Having no detectable fonts at all, or a list that changes on every refresh, is itself a rare trait.

### What each browser does

| Browser | Default behavior | What you can do |
|---|---|---|
| Safari | Web pages can only use the fonts that ship with the system; fonts you installed yourself are invisible to pages | Keep the defaults; little extra setup is needed |
| Firefox | Recent versions limit the range of fonts visible to pages in private windows and under strict Enhanced Tracking Protection (roughly system fonts and language-pack fonts only); check your version for specifics | Set Enhanced Tracking Protection to "Strict" in Settings. Advanced users can look at the `layout.css.font-visibility` entries in `about:config`; lower values mean fewer visible fonts |
| Chrome / Edge | The CSS width-and-height method is unrestricted, so every installed font can potentially be detected | In Chrome, go to Settings → Privacy and security → Site settings → Additional permissions → Fonts and choose to block sites from accessing local fonts. Deny font permission prompts unless the site is a design tool you actually use. This setting only covers Local Font Access and does not stop the width-and-height method |

### What you can do at the system level

- **Clean up unused fonts in your user directory.** Uninstall the ones from Step 1 that you no longer use. If your design work needs many fonts, consider using a separate system account or a separate browser profile for it.
- **Keep work and everyday browsing in separate browser profiles.** Put design and typesetting work, which installs many fonts, in a different profile from everyday browsing, or use a browser such as Safari or Firefox that limits fonts by default for everyday browsing.
- **Do not install "font spoofing" extensions.** Extensions that randomize your font list can make your fingerprint different every time, which then fails to match stable signals such as timezone, language and IP. Sites find that inconsistency suspicious. For the reasoning, see [Browser fingerprint and environment checks: what is exposed when timezone, language, fonts and IP do not match](/en/blog/browser-environment-consistency).

One more reminder: these settings are meant to reduce unnecessary exposure, not to get around a site's security checks. Platforms have their own rules for multiple devices and unusual environments, so follow their terms of service and local laws.

## FAQ

### Does incognito mode prevent font fingerprinting?

In Chrome, no. Installed fonts can still be measured. Firefox private windows narrow the visible font range, with results depending on version and settings. For a breakdown of what incognito mode does and does not protect against, see [this hands-on test](/en/blog/incognito-mode-privacy-myths).

### Do web fonts loaded by a site count toward my fingerprint?

No. Fonts a page downloads itself via `@font-face` are supplied by the site and are the same for every visitor, so they say nothing about your device. Only locally installed fonts distinguish you.

### How is font fingerprinting related to canvas fingerprinting?

Canvas fingerprinting draws text onto a canvas and reads back the pixels, so differences in fonts and rendering engines show up in the result, and the two overlap. Even if your font list is restricted, rendering-level differences may remain. See [Canvas and WebGL fingerprinting](/en/blog/canvas-webgl-fingerprint-explained).

### What else should I check besides fonts?

Fonts are usually collected together with timezone and language. For self-checking language and timezone, see [Your timezone and language give you away too](/en/blog/timezone-language-leak-check). For network-level DNS and WebRTC leaks, see [DNS leaks and WebRTC leaks](/en/learn/dns-leak-webrtc-leak). How each cdnping check collects its data is described on the [methodology](/en/methodology) page.
