A quantum random number generator built from a consumer webcam.
Light is made of individual photons that arrive at any point in space at genuinely unpredictable moments. A camera sensor measures the count of photons hitting each pixel per frame. If a particular pixel averages 1,000 photons per millisecond, in practice one frame might catch 973, the next 1,021, the next 997 — the count fluctuates because the arrival of each photon is quantum-random. Whether the count for that frame ends up even or odd is itself unpredictable, so we read the last binary digit of every pixel value: even becomes 0, odd becomes 1. This page captures those digits, cleans them, and certifies the output against the NIST SP 800-22 randomness test suite. Every bit shown below was produced this way from a real webcam capture.
A continuous playback of 1,000,000 certified random bits captured from the webcam experiment.
NIST SP 800-22 certification
The US National Institute of Standards and Technology publishes the official randomness test battery that commercial generators are measured against. It runs eight statistical tests on the bit sequence, each one hunting for a hidden pattern (too many of one digit, too few switches between 0 and 1, repeating sub-sequences, and so on) that a genuinely random source would not produce. Each test returns a score between 0 and 1 comparing the observed data to what truly random bits would look like mathematically. Anything above the industry threshold counts as passed: no non-random pattern was detected.
| Test | Score | Result |
|---|---|---|
| Loading… | ||
How this works
After the raw bits are collected from the webcam, they are cleaned in two stages. A Von Neumann extractor removes any slight bias introduced by the sensor electronics, then a SHA-256 whitening pass compresses the result so that any correlations between nearby pixels are destroyed. The output is then submitted to the NIST SP 800-22 battery for certification before being served from this page.