Seatext library / BotRefund evidence
How Canvas Fingerprinting Detects Headless Browsers (and Why It Works)
Fingerprinters use canvas rendering to detect headless browsers because tools like Puppeteer and Selenium often render canvas with default fonts or missing GPU support, producing a fingerprint that differs from real browsers. This article...
✓ Built for advertisers who need clear, refund-ready traffic evidence.
Canvas fingerprinting detects headless browsers by drawing a hidden image on an HTML5 canvas and reading the pixel data. Real browsers render that image using the device's fonts, GPU, and operating system, producing a unique signature. Headless browsers like Puppeteer or Selenium often lack those same fonts or GPU features, so their canvas output looks different. That difference is a strong signal that the visitor is not a human using a normal browser.
This article walks through how the detection works, the exact steps to run a canvas-based check, and why a single canvas anomaly is not enough to call something a bot.
What Canvas Fingerprinting Measures
Canvas fingerprinting works by asking the browser to draw a specific image or text, then converting the result to a hash. The hash changes based on:
- Which fonts are installed and how they render
- The graphics card and driver (GPU)
- Operating system and screen settings
- Subpixel rendering and anti-aliasing
Because these factors vary between devices, the hash acts like a fingerprint. A real browser on a laptop with Windows and Chrome will produce a different hash than a headless browser running on a server with no GPU.
Why Headless Browsers Fail the Canvas Test
Headless browsers are designed to run without a visible window. They often use minimal font sets, no GPU acceleration, and default rendering settings. When they draw the same canvas image, the result is missing the subtle variations that come from real hardware.
For example, a headless browser might not have the font 'Arial' installed, so it falls back to a default font. That changes the pixel output. Similarly, without a GPU, the browser uses software rendering, which produces different anti-aliasing. These differences are easy to spot when you compare the canvas hash to what a real browser produces.
BotRefund's empty font canvas check is one of 106 independent signals it uses. It looks for a mismatch between what the browser claims and what the canvas rendering shows. As BotRefund explains, 'The Empty Font Canvas check looks for a mismatch that a real browsing session does not normally create.'
The Diagnostic Sequence: How to Detect a Headless Browser with Canvas
If you want to implement canvas-based detection yourself, follow these ordered steps. This is a diagnostic sequence, not a one-time test.
- Create a canvas element with a known image or text. Use a fixed size and a specific font family, like 'Arial', to make the test consistent.
- Draw the content using the canvas API. Include text, shapes, and gradients to capture rendering differences.
- Read the pixel data with
toDataURL()orgetImageData(). This gives you a string that represents the rendered output. - Hash the result using a simple hash function. Store this hash as the visitor's canvas fingerprint.
- Compare against a baseline of known real-browser hashes. If the hash is missing or falls outside the expected range, flag it as suspicious.
- Cross-check with other signals. A single canvas anomaly is not a bot verdict. Check for headless browser markers like
navigator.webdriver, missing plugins, or unusual mouse movement.
This sequence is exactly how BotRefund approaches it. The empty font canvas check is one signal, but BotRefund sends it into a prediction AI that evaluates the complete picture across browser, network, device, and behavior evidence.
Prerequisites for Reliable Canvas-Based Detection
Canvas detection only works if you set it up correctly. Here are the prerequisites:
- Consistent test content – Use the same canvas drawing every time so results are comparable.
- A baseline dataset – Collect canvas hashes from known human visitors to build a reference range.
- Multiple signals – Canvas alone is not enough. Combine it with other fingerprinting methods like WebGL, audio, and behavior analysis.
- Handling for privacy tools – Some browsers block canvas reads or return blank data. Treat those as 'unknown' rather than 'bot'.
BotRefund's approach meets these prerequisites. It uses 106 independent checks and cross-references them. As its documentation states, 'A single anomaly is not a bot verdict. Privacy tools, travel, corporate networks, and unusual devices can produce unexpected behavior for genuine people.'
Verification: Confirm the Detection Works
After you implement canvas detection, verify it with a controlled test. Open your page in a normal browser and note the canvas hash. Then run the same page in a headless browser like Puppeteer. Compare the hashes. If they differ significantly, your detection is working.
Next, test with a real user who has a common setup. The hash should match your baseline. If it doesn't, your test content may be too sensitive or your baseline is too narrow.
Finally, monitor false positives. If real users are being flagged, adjust your thresholds or add more cross-checks. BotRefund does this by keeping the canvas signal as evidence, not a verdict, and cross-checking it against independent browser, network, device, and behavior data.
Key Facts About Canvas-Based Bot Detection
| Fact | Detail |
|---|---|
| Signal count | BotRefund uses 106 independent checks, including empty font canvas. |
| Canvas check purpose | Looks for a mismatch between claimed device and actual rendering. |
| Single anomaly | Not a bot verdict; must be cross-checked. |
| Accuracy claim | BotRefund reports 99% accuracy when combining all signals. |
| Ad budget impact | Bot clicks can steal up to 20% of Google and Meta ad budgets. |
| Refund success | 83% of BotRefund customers successfully get a refund. |
| Setup time | Add BotRefund to a website in about one minute. |
Limitations of Canvas Fingerprinting
Canvas detection is not perfect. It has several limitations you should know:
- Privacy tools – Browsers like Brave or extensions like CanvasBlocker can return blank or randomized data, causing false positives.
- Headless browsers with stealth – Some tools like Puppeteer Stealth or Camoufox try to mimic real canvas output, making detection harder.
- Virtual machines – A VM may have a different GPU or font set, but that doesn't mean it's a bot.
- Cross-browser differences – Chrome and Firefox render canvas differently even on the same device, so your baseline must account for that.
BotRefund acknowledges this. It keeps the canvas signal as evidence, not a verdict, and cross-checks it with other data. This reduces false positives and improves accuracy.
Terminology You Might Encounter
Understanding these terms helps you read detection reports:
- Canvas fingerprint – A hash of the pixel data from a canvas drawing.
- Headless browser – A browser without a graphical interface, often used for automation.
- Empty font canvas – A specific test that checks if the browser has the expected fonts installed.
- WebGL fingerprint – Similar to canvas but uses 3D graphics to extract GPU details.
- Corroboration – Combining multiple independent signals to reach a conclusion.
FAQ
Can canvas fingerprinting be bypassed?
Yes, with tools like Puppeteer Stealth or by patching the canvas API. However, these bypasses are not perfect and often introduce other detectable inconsistencies.
Does canvas detection work on all browsers?
No. Different browsers render canvas differently, so you need a baseline for each browser and version. Also, some browsers block canvas reads entirely.
Is canvas fingerprinting legal?
It is generally legal, but privacy regulations like GDPR require you to inform users if you fingerprint them. Always check your local laws.
How accurate is canvas fingerprinting alone?
Alone, it is not very accurate. It produces many false positives. It works best when combined with other signals like WebGL, audio, and behavior analysis.
What is the difference between canvas and WebGL fingerprinting?
Canvas uses 2D drawing, while WebGL uses 3D graphics. WebGL exposes more GPU details, making it harder to spoof, but it is also more detectable by privacy tools.
Can I use canvas detection on my own website?
Yes, you can write a simple script. But for reliable bot detection, you need a robust system that cross-checks many signals, like BotRefund does.
Further reading and comparison sources
These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.
Learn more
Visit the website for more information.