Canvas 2D fingerprint
Draws text and shapes to a hidden canvas, then hashes the pixels the device produced.
In one line
Can turn a hidden drawing into a device number that works without cookies
Draws text and shapes to a hidden canvas, then hashes the pixels the device produced.
GPU, driver, OS font rasterizer and anti-aliasing leave tiny pixel differences. The hash is a stable device-class identifier that works with no cookies and no prompt.
What it can and can't do
What the user does: Nothing. It happens when the page loads
It can
- Draw hidden text and shapes, then check the pixels your device made
- Create a number from your graphics card, fonts and software
- Recognise the same device on later visits, even after cookies are cleared
It cannot
- Show the drawing to you
- Tell exactly who you are by itself
- Get exact results from Tor Browser, which asks first, or from Brave, which adds noise
- Be turned off by a cookie banner choice
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 2 | 2009-05-21 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 2 | 2006-10-24 | None |
| Safari | Supported | 4 | 2009-06-08 | None |
| Safari on iPhone | Supported | 3 | 2009-06-17 | None |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | canvas.getContext('2d'); toDataURL(); getImageData(); toBlob() |
| Browser compat keys | api.HTMLCanvasElement.toDataURLapi.CanvasRenderingContext2D.getImageData |
| How access is granted | none |
| What the user sees | Not listed |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Not listed |
| How to take it back | Not listed |
| Inside an iframe | Not listed |
Typical flow
- Create off-screen canvas
- fillText with odd fonts plus arcs and gradients
- Read pixels with toDataURL or getImageData
- Hash the result (murmur3 or SHA-256)
Data you get
What comes back: Hash of 300x150 default canvas pixels (about 180 KB RGBA read out as a string or hash)
Shape: hash
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
pixels | binary | RGBA bytes | 300x150 default | 1 level per channel before noise |
hash | hash | bits | 32 to 256 | stable across reloads on the same stack |
Technical limits
- Pixel output is device class level, not per-device unique: millions of identical hardware and software stacks collide
- Cannot identify the person alone; best combined with WebGL, audio and fonts
- Tainted cross-origin canvases refuse readback
The story
What it is
A script draws text and shapes in a hidden canvas, then hashes the pixels the device produces.
For you
You do not see it. The same drawing looks a little different on different computers because of fonts and graphics chips, so your result works like a quiet ID card.
For makers
Ad tech and fraud vendors use it as one core signal in a bundle. Its value is that it works on most browsers with no permission and stays the same after cookies are cleared.
Where you see it
| Type | Example | Apps |
|---|---|---|
| ads | A data broker uses the canvas hash to match your phone visit and laptop visit to the same profile. | None named |
| security | A payments site flags a checkout when the same canvas hash shows up on hundreds of fake orders. | None named |
| games | A game site bans a cheater and then recognizes the same device when they try to make a new account. | None named |
| analytics | A web analytics tool without cookies uses the canvas hash to count unique visits. | None named |
| social | A social site blocks a banned user from signing up again from the same device. | None named |
| shopping | A ticket seller finds a single scalper using one browser behind many accounts. | Ticketmaster |
| banking | A bank links your new login to your trusted device list without asking for a code every time. | None named |
Risks
- Cookie clearing does not help
- Works across sites
What the platform says
- Mozilla: Firefox fingerprinting protection. Firefox says it blocks known fingerprinting scripts and makes canvas readback less unique.
Good uses and abuse
Legitimate uses
- Anti-fraud device ID, bot detection, font and emoji support checks
Known abuse
- Cookieless cross-site tracking, fingerprint resale, covert re-identification after cookie clearing
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 4 of 5 | How revealing the data is |
| Utility | 1 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 7 | Rough identifying entropy, when known |
History
- 2012-05, paper: Mowery and Shacham 'Pixel Perfect' introduces canvas fingerprinting
- 2014-07, paper: Acar et al. find AddThis canvas fingerprinting on 5% of top 100k sites
- 2015-09, Firefox 41: Canvas extraction prompt added under privacy.resistFingerprinting (Tor Uplift)
- 2023-09, Safari 17: Canvas noise in Private Browsing (Advanced Fingerprinting Protection)
- 2025-09, Safari 26: Fingerprinting protection extended to all browsing for known fingerprinting scripts
- 2025-11, Firefox 145: Randomized canvas readback in Private Browsing and ETP Strict
Related capabilities
Related
- WebGL render hash. Can draw a hidden 3D scene and use the pixels to tell your device apart
- Emoji and glyph rendering. Can draw emoji to tell your system and version apart
- Brave farbling. Can't track you across sites by device traits when Brave adds random noise
Sources
- Mowery and Shacham, Pixel Perfect (2012)
- MDN toDataURL
- FingerprintJS
- Laperdrix et al., Beauty and the Beast (AmIUnique 2016)
How well checked: Based on official documentation.