Fingerprinting

Canvas fingerprinting

Also called canvas fingerprint, canvas hash, HTML5 canvas fingerprinting, toDataURL

Definition

Canvas fingerprinting is a technique in which a page draws hidden text and shapes on an HTML canvas, reads the pixels back and hashes them, because the exact result depends on the device's graphics hardware, drivers, fonts and operating system.

Last updated 7 November 2026

How it works

The canvas element lets a page draw with JavaScript. A fingerprinting script creates a canvas the visitor never sees, writes a line of text in a few fonts (often with an emoji), adds shapes and a gradient, then reads the result back with toDataURL() or getImageData() and turns it into a short hash.

The same instructions don’t produce identical pixels everywhere. Anti-aliasing, font rendering, the graphics driver and the operating system all leave small differences. Keaton Mowery and Hovav Shacham described the method in 2012. On one computer, with one browser build, the hash is the same in every tab and every profile, which is what makes it useful for recognising a device.

Why it matters when you run several accounts

Several profiles on one computer return the same canvas hash unless something changes it. Changing it from a script inside the page is risky, though. Test pages draw images whose correct output is known, check whether the drawing functions have been replaced, and read the canvas twice to see whether the answer moves. Noise that is detected, or that changes between reads, can single a profile out more than the honest result would.

How SoftGlaze Browser handles it

On the standard engine, SoftGlaze Browser does not change a 2D canvas drawing. A profile returns your computer’s real canvas result there, because changing it from a script is easy for sites to spot. The optional fingerprint-chromium engine, off by default, changes canvas output inside the browser itself from a per-profile seed. On the standard engine the other drawing tests (WebGL image, AudioContext and ClientRects) do differ per profile, with their noise switches on, which is the default. If a profile claims a different operating system from the computer’s, the editor warns that the canvas raster still comes from the real machine.

Sources

  1. Pixel Perfect: Fingerprinting Canvas in HTML5 (Mowery and Shacham, 2012)UC San Diego
  2. Canvas APIMDN Web Docs
  3. HTMLCanvasElement: toDataURL() methodMDN Web Docs

Outside sources were checked in November 2026. Browsers, standards and vendors' pages change, so details that depend on them are as of that month.

Read more on this site

See it in SoftGlaze Browser

Separate profiles, each with its own cookies, device values and proxy, on Windows. Try the app's screens in your browser first, or start the free trial; no card needed.