WebGL fingerprinting
What is WebGL Fingerprinting?
WebGL does more than draw 3D scenes. It exposes limits, extensions, shader precision, renderer information, and the final pixels produced by a layered graphics stack. Together, those details can help recognize a browser later as part of alarger browser profile.
- Stored ID
- Not required
- Data source
- Graphics stack
- Evidence
- Capabilities + pixels
- Meaning alone
- Not a person
canvas.getContext('webgl')WebGL Fingerprinting Demo
Inspect what your browser makes visible.
Run a local WebGL scene, read back its pixels, and inspect a small set of graphics capabilities. Nothing in this demonstration is transmitted or saved.
- WebGL
- Not inspected
- Renderer
- Not inspected
- Likely GPU
- Not inspected
- Texture limit
- Not inspected
- Vertex attributes
- Not inspected
- Extensions
- Not inspected
- Fragment highp
- Not inspected
Run the demonstrationValues can be masked, generalized, or unavailable. The digest summarizes this one rendered scene; it is not proof that the device is unique.
Two evidence surfaces
WebGL can be measured before and after it draws.
A script can inventory the environment first, then render a controlled scene and compare the pixels. The useful signal is often the combination.
The rendering path
The same scene passes through several implementations.
WebGL is a browser API, not a direct serial-number reader. Its value comes from observing the behaviors and limits that emerge as one scene moves through the graphics stack.
- 01Page
Scene, geometry, textures, and shader programs
- 02Browser
WebGL implementation and privacy policy
- 03Translation
ANGLE or another graphics translation layer
- 04Driver + GPU
Hardware capabilities and vendor implementation
- 05Pixels + properties
Two kinds of evidence return to JavaScript.
// Fragment shader
precision mediump float;
uniform float time;
void main() {
vec2 p = gl_FragCoord.xy / 256.0;
float wave = sin((p.x + time) * 18.0);
gl_FragColor = vec4(p.x, wave, p.y, 1.0);
}Shader precision
A shader is a small program the graphics stack executes.
Vertex shaders position geometry. Fragment shaders calculate color for the pixels that survive rasterization. WebGL also lets scripts ask how much numeric range and precision the implementation supports for different shader types.
getShaderPrecisionFormat()returns supported numeric range and precisionPrecision is only one input. Compilation, optimization, interpolation, texture sampling, and driver behavior can also affect the resulting evidence.
What the result means
A graphics profile further narrows the crowd.
WebGL observations describe the exposed implementation. Their identifying power depends on how rare and stable the combined values are in the observer’s population.
- graphics backend and GPU family
- supported features and resource limits
- shader precision characteristics
- a repeatable rendering pattern
- a GPU serial number
- your name or account
- a guaranteed exact physical model
- a globally unique identity
Canvas and WebGL
Related graphics surfaces, different depth.
Both can turn rendering into data. WebGL adds a programmable pipeline and a much broader capability surface.
| Question | Canvas | WebGL |
|---|---|---|
| Primary surface | 2D drawing API | Programmable 3D graphics API |
| What can be queried | Mostly the rendered bitmap | Capabilities, extensions, precision, metadata, and pixels |
| Graphics path | Fonts, rasterization, compositing | Browser, translator, driver, GPU, shaders |
| Typical probe | Draw text and shapes | Query limits and render a shader-driven scene |
| Useful alone | Sometimes | Sometimes; stronger when combined with other signals |
Meaningful defenses
Reduce how much the graphics stack can distinguish.
Defenses work best when many people receive the same treatment. A rare, heavily modified setup can become its own signal.
Generalize metadata
Report fewer renderer details or map many implementations to broader shared values.
Standardize capabilities
Expose a common set of limits, extensions, and precision values across a larger population.
Control pixel readback
Gate, block, or perturb access when a script tries to turn a rendered scene into data.
Limit WebGL carefully
Disabling acceleration can break useful applications and may create an unusual software-rendered profile.
Explore guides